While you can create complex trigger criteria using the JSON, I found it easier to create the criteria in code and cause a simple trigger. To me this is more flexible and bypasses a lot of the hassle of JSON. If you're interested you can look at my tutorial: http://jabelarminecraft.blogspot.com/p/minecraft-modding-advancements.html
There are a number of classes such as the JsonToNBT, the CompressedStreamTools, and even methods in the NBTBase class that deal with various approaches to serialization of NBT. I haven't used them myself, but I assume they are close to what you're looking for. Just check out how they are used in vanilla.
for (int i = 0; i < Blocks.BLOCKS.length; i++) {
event.getRegistry().register(new ItemBlock(Blocks.BLOCKS).setRegistryName(Blocks.BLOCKS.getRegistryName()));
}
from my code
so for your code it would be
event.getRegistry().register(new ItemBlock(Blocks.testBlock).setRegistryName(Blocks.testBlock.getRegistryName()));
Try deleting then recreating your resources directory. DON'T JUST PASTE your files back in, recreate every file & folder from scratch, or copy minecraft's version inside and delete everything you don't need.
I had an issue where I had some very small problem with my lang file and had to do this
This bug exists in 1.12.2 - 14.23.3.2685 due to the way the devs tried to implement FMLThrowingEventBus, I have been informed that this change will be undone and they will try to find a different method of implementing it.
1
point
Important Information
By using this site, you agree to our Terms of Use.