Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leaderboard

Popular Content

Showing content with the highest reputation on 06/16/21 in all areas

  1. This. The reason for this is that DeferredRegister relies on static initializers. If you put your RegistryObjects in some random class it is not guaranteed that that class is actually initialized by the time your DeferredRegister is. Hence: Put the DeferredRegister and its entries in the same class. @ObjectHolder is explained here: https://mcforge.readthedocs.io/en/latest/concepts/registries/#using-objectholder
    1 point
  2. First of all the BLOCKS and ITEMS fields (i.e. your DeferredRegister instances) should not be in a separate class. Put them in the same class or you will have issues. No, you cannot, because then you defeat the entire purpose of DeferredRegister. You must create your registry objects (blocks, items, etc.) in the registry event. DeferredRegister manages this for you. If you don't want this, you can also manually subscribe to RegistryEvent and create and register your things there. You can then use @ObjectHolder to obtain the instances for your registry entries. You can also mix and matc
    1 point
  3. There is none that I know of. But I will be working on a patch to Forge to work around this problem.
    1 point


  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.