Quartz 图标

Quartz

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.2.0-alpha.4
本资源为搬运资源,原资源地址: https://modrinth.com/mod/qtz
资源信息

Minecraft 版本: 1.21.1

平台: neoforge

标签: library utility

资源介绍

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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
ULTRAJACKHAMMER

价格:0 墨喵币
下载量:0

查看详情
GroovyDuvet

价格:0 墨喵币
下载量:0

查看详情
Chunky Autopause

价格:0 墨喵币
下载量:0

查看详情
HunterZ Underground

价格:0 墨喵币
下载量:0

查看详情