Jump to content

Simsure

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Simsure

  1. 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/

    Quote

    Add entries to the OreDictionary during the FMLPreInitializationEvent phase, after initializing the blocks and items that you will register.

     

  2. 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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.