#Placing Item as Block
19 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
I guess i just can't figure out BlockItem is all
StartupEvents.registry("block", ... automatically registers an item unless otherwise intentionally disabled via noItem() method
I'm pretty sure you can also modify the item by using the .item(item => {}) callback method on the block builder
True
I guess the main thing I want is for the item to render as an item and not as block in the inventory
The block is a cross so the model is still 2D in the inventory, but i'd like it to show a specific item texture
Like vanilla kelp does
if that makes any sense at all lmao
I'll try this first
Well this didn't work, but i prolly did it wrong lolStartupEvents.registry('block', event => { event.create('sculk_kelp_plant_top') .displayName('Abyssal Kelp') .soundType('grass') .hardness(0.0) .resistance(0.0) .lightLevel(0.4) .renderType('cutout') .noCollision() .notSolid() .waterlogged() .model('kubejs:block/sculk_kelp_top') .tagBlock('forge:plant/water') .tagBlock('c:water_plant') .item(item => { item.texture('kubejs:item/sculk_kelp') }) })
I think you can do .model("namespace:item/model_name") on the item builder?
You just need to create a model for it
??utils
Misodes is an amazing collection of datapack (and resource pack!) json generators for everything from loot tables to models, dimensions, biomes and other worldgen things.
If your item is just a texture, make the model parent "item/generated"