Chisel Chipped Integration

Chisel Chipped Integration

1M Downloads

[Help/Question] Add a new block with a addon

MarcusElg opened this issue ยท 3 comments

commented

I'm creating a addon for chisel and want to add new blocks. I've downloaded the api and have got that working but I don't know how to add a new chisel block. There are many classes which have a addBlock methoud so which one should you use?

commented

All you need to do is to make your blocks and then register them to a carving group with CarvingUtils.getCarvingRegistry().addVariation(). The one you want has three parameters, String for group name, IBlockState for which block to add, and int for placement in ordering. API class for ICarvingRegistry is here

Edited comment to use CarvingUtils.getCarvingRegistry().addVariation() instead of unsafely accessing field in CarvingUtils.chisel.addVariation()

commented

For consistency's sake I would pefer people use CarvingUtils.getCarvingRegistry() for forward compatibility. Field access is not as safe.