-
Posts
3 -
Joined
-
Last visited
Posts posted by Simsure
-
-
39 minutes ago, desht said:
You haven't posted your block registration code, but I sincerely hope you're doing it in a RegistryEvent.Register<Block> event handler?
Sure.
39 minutes ago, desht said:Block/item registration happens after preInit, and before init. So oredict registration should happen in init (i.e. in response to a FMLInitializationEvent).
Ok....but why the documentation tell me to put it in preInit?
https://mcforge.readthedocs.io/en/latest/utilities/oredictionary/
QuoteAdd entries to the OreDictionary during the
FMLPreInitializationEvent
phase, after initializing the blocks and items that you will register. -
Hi, pretty noob to minecarft modding here, i alredy know how to program with java, and i was testing a bit with forge in the last weeks.
My question is, if i add a wood planks to the ore directory, in theory i should be able to use it in every minecraft recipe that require wood planks, right? Like to craft sticks.
I have done this with my custom block.
OreDictionary.registerOre("plankWood", ModBlocks.MY_PLANKS);
I have put this in the preInit event just after have instantiated the block in my ModBlock class.
Have i done something wrong? Or i have to make the recipe for every object that require wood planks with my wood by hand?
Thanks.
Modded wood planks in ore directory
in Modder Support
Posted
Moved the registration to Init event, now it works, thanks!