[Help/Question] Add a new block with a addon
MarcusElg opened this issue ยท 3 comments
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?
Take a look at my Xtones compat https://github.com/TehNut/Xtones/blob/1.11/src/main/java/tehnut/xtones/compat/CompatChisel.java
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()