Closed dancerphil closed 6 years ago
The code can be replaced as:
ForgeRegistries.BLOCKS.register(blockSimple);
ForgeRegistries.ITEMS.register(itemBlockSimple);
in StartupCommon.java
And I think it's the best practice.
Current best practice with 1.12 is using the event based registries.
You can use the following registries (that I know of):
RegistryEvent.Register
A small example (by LexManos): https://gist.github.com/LexManos/86e88c591c34dfcb34845268200fbd98
Hi guys Thanks for that. I'm planning to update the code to 1.12 shortly so I'll incorporate your suggestions then. I do find it very frustrating how the Forge guys keep changing things to "optimise them". It doesn't do us coders any favours to keep breaking the "API" all the time. But anyway Thanks for the help.
Cheers TGG
I think the Item Registry changes were forced by changes on Minecrafts end (in 1.12). I think its a little harsh to blame Forge here.
Any way, thanks for your great work here.
Closing (addressed in 1.12.2 version). May change to event-based registration shortly. Thanks for the help. -TGG
The GameRegistry.register() function is set private. And the example may seem to be confused.