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:custom_machine").machine("namespace:machine_id)
event.create("kubejs:stone_generator", "custommachinery:custom_machine").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:custom_machine")
//Add .occlude() to make the machine block full opaque (block light)
//This may cause rendering issues
event.create("custommachinery:power_crusher", "custommachinery:custom_machine").occlude()
})Last updated