Custom Block/Item
Create a custom block and item for your machine
//Subscribe to the block registry event.
//No need to use the item registry event, the item will be created automatically.
StartupEvents.registry('block', event => {
//Syntax : event.create("namespace:block_id", "custommachinery").machine("namespace:machine_id)
event.create("kubejs:stone_generator", "custommachinery").machine("custommachinery:stone_generator")
//If the block id is the same than the machine id you don't have to use .machine()
event.create("custommachinery:power_crusher", "custommachinery")
//You can specify the render type of the block by using .renderType("type")
//Type must be one of solid, cutout or translucent
//Default is translucent
event.create("custommachinery:power_crusher", "custommachinery").renderType("solid")
//Add .occlude() to make the machine block full opaque (block light)
//This may cause rendering issues
event.create("custommachinery:power_crusher", "custommachinery").occlude()
})Last updated