Custom Blocks

This is a startup script.

events.listen('block.registry', function (event) {
  event.create('test_block').material(block.material.glass).hardness(0.5).displayName('Test Block')
})


The texture for this block has to be placed in kubejs/assets/kubejs/textures/block/test_block.png.
If you want a custom block model, you can create one in Blockbench and put it in kubejs/assets/kubejs/models/block/test_block.json.


Revision #3
Created Sun, Jun 28, 2020 5:09 PM by LatvianModder
Updated Mon, Jun 29, 2020 8:41 PM by LatvianModder