Jump to content

rbmatt

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by rbmatt

  1. Can someone give me an example of registering MEMORY_MODULE_TYPES and SENSOR_TYPES in DeferredRegister?

     

    public static final DeferredRegister <MemoryModuleType <? >> MEMORY_MODULE_TYPES = novo DeferredRegister <> (ForgeRegistries.MEMORY_MODULE_TYPES, Main.MOD_ID);

     

    public static final DeferredRegister < SensorType <? >> SENSOR_TYPES = novo DeferredRegister <> (ForgeRegistries. SENSOR_TYPES , Main.MOD_ID);

  2. 3 minutes ago, imacatlolol said:

    Spoon-feeding code is frowned upon on these forums, but I can try rewording what I already mentioned in a more tutorial-esque way:

    1. Extend SoundType and override all of its "get sound" methods.
    2. In the constructor, replace the parameters of SoundEvent with RegistryObject<SoundEvent>. You'll also need to place them is fields, obviously.
    3. Put null when the super constructor wants SoundEvent objects, we won't be using them anyways.
    4. In the overridden methods, return RegistryObject#get for each of your corresponding objects.

    If any of that was confusing, you may need to spend some more time learning Java before you start modding.

    gave you an idea, thanks

×
×
  • Create New...

Important Information

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