MonitoringMinecraft MonitoringMinecraft

Quartz

Мод NeoForge

Quartz — мод-библиотека для Майнкрафт с декларативным Kotlin DSL для разработки под NeoForge

11 скачиваний 0 подписчиков
Оцените первым

Quartz [WIP/Alpha/Unstable]

A Kotlin DSL for NeoForge modding. Declarative block/item registration with auto-BlockItem and built-in datagen.


⚠️ Developer Library Quartz is a library mod for developers and does not add any content to the game by itself. You only need to install this if another mod explicitly requires it.


Quick Start

class ModBlocks : BlockRegistry("modid") {
    val myBlock by block {
        configureBlock { strength(2f) }
    }

    val myStair by stair(Blocks.STONE) {
        texture("minecraft:block/polished_andesite")
    }

    val mySlab by slab {
        configureBlock { strength(1.5f) }
    }
}

class ModItems : ItemRegistry("modid") {
    val myItem by item {
        configureProperties { stacksTo(16) }
        texture("modid:item/custom_thing")
    }

    val mySword by sword(Tiers.IRON) {
        attackDamage = 4f
        attackSpeed = -2.8f
    }
}

// In your @Mod class:
class MyMod(modEventBus: IEventBus) {
    init {
        ModBlocks.register(modEventBus)
        ModItems.register(modEventBus)
        QuartzDataGatherers.register(modEventBus)
    }
}

Block Types

Type Function Params Auto-generates
Basic block {} configureBlock {}, configureItem {} block item
Custom class block<MyBlock> {} customBlock(::MyBlock), configureBlock {} block item
Stair stair(baseBlock?) {} baseBlock, texture(), renderType, configureBlock {} stair models (inner/outer/straight), blockstate, loot
Slab slab(baseBlock?) {} baseBlock, texture(), renderType, configureBlock {} slab model, blockstate, loot
Wall wall(baseBlock?) {} baseBlock, texture(), renderType, configureBlock {} wall models (post/side), blockstate, loot
Fence fence(baseBlock?) {} baseBlock, texture(), renderType, configureBlock {} fence models (post/side), blockstate, loot
Fence Gate fenceGate(baseBlock?, woodType) {} baseBlock, woodType, texture(), configureBlock {} gate models, blockstate, loot, tags
Button button(baseBlock?, blockSetType, ticks) {} baseBlock, blockSetType, ticks, texture(), configureBlock {} button model, blockstate, loot
Pressure Plate pressurePlate(baseBlock?, blockSetType) {} baseBlock, blockSetType, texture(), configureBlock {} plate model, blockstate, loot
Pillar pillar(baseBlock?) {} baseBlock, textureSide(), textureEnd(), configureBlock {} column models (axis variants), blockstate, loot
Door door(baseBlock?) {} baseBlock, textureBottom(), textureTop(), configureBlock {} door models (bottom/top), blockstate, loot
Trapdoor trapdoor(baseBlock?) {} baseBlock, texture(), renderType, configureBlock {} trapdoor models (open/closed/top), blockstate, loot
Flower flower(baseBlock?) {} baseBlock, texture(), configureBlock {} flower model, blockstate, loot
Tall Flower tallFlower(baseBlock?) {} baseBlock, textureBottom(), textureTop(), configureBlock {} tall flower models (bottom/top), blockstate, loot
Torch torch(baseBlock?) {} baseBlock, texture(), configureBlock {} torch + wall torch models, blockstate, loot
Snow Layer snowLayer(baseBlock?) {} baseBlock, texture(), configureBlock {} layer models (heights 1–8), blockstate, loot

When baseBlock is provided, the texture defaults to the base block's registry ID (namespace:block/path). When omitted, the texture auto-resolves from the property name by stripping the type suffix (e.g. my_stairsblock/my, oak_fence_gateblock/oak).

Item Types

Type Function Params Auto-generates
Basic item {} configureProperties {}, texture(), model item model
Custom class item<MyItem> {} customItem(::MyItem), configureProperties {}, texture() item model
Sword sword(tier) {} tier, attackDamage, attackSpeed, configureProperties {}, texture() handheld model, sword/sword_enchantable/weapon/damage tags
Pickaxe pickaxe(tier) {} tier, attackDamage, attackSpeed, configureProperties {}, texture() handheld model, pickaxe/pickaxe_enchantable/mining tags
Axe axe(tier) {} tier, attackDamage, attackSpeed, configureProperties {}, texture() handheld model, axe/axe_enchantable/mining tags
Shovel shovel(tier) {} tier, attackDamage, attackSpeed, configureProperties {}, texture() handheld model, shovel/shovel_enchantable tags
Hoe hoe(tier) {} tier, attackDamage, attackSpeed, configureProperties {}, texture() handheld model, hoe/hoe_enchantable/mining tags

Textures default to modid:item/<snake_case_name>. Override with texture("modid:path").

Datagen

Call QuartzDataGatherers.register(modEventBus) in your @Mod class.

Each block type auto-generates:

  • Blockstate JSON
  • Block models
  • Item model
  • Loot table (self-drop by default, configurable)

Each item type auto-generates:

  • Item model (item/generated or item/handheld for tools)
  • Tag entries (tools only)

License

MIT. See LICENSE for details.

Смотри также

Похожие подборки моды — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
1737 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
Minestory
27 онлайн
1.21 — 26.2 версия
Выживание • Экономика • Кланы • Приваты • Ивенты • PVP • Работа
BULLCRAFT
BULLCRAFT Java + BE
118 онлайн
26.2 версия
Анархия! PvP | Работают поршни и вагонетки
ReallyWorld КОПИЯ ВСЕМ АДМИНКА
57 онлайн
1.16.5 — 1.21.1 версия
ПвП, Гриферство, бесплатный донат Dragon, AIR DROP
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.21.4. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат