rbmatt
-
Posts
5 -
Joined
-
Last visited
Posts posted by rbmatt
-
-
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);
-
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:
- Extend SoundType and override all of its "get sound" methods.
- In the constructor, replace the parameters of SoundEvent with RegistryObject<SoundEvent>. You'll also need to place them is fields, obviously.
- Put null when the super constructor wants SoundEvent objects, we won't be using them anyways.
- 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
-
16 hours ago, imacatlolol said:
Use the solution I posted, it's a fine workaround for the time being until Forge makes an official fix.
could you give me an example of this, please? I'm a little beginner
-
On 5/7/2020 at 3:45 PM, Corgam said:
I hope there is. I feel like it is a common thing to do for modders, to add new blocks with new sounds, so it would be nice to have a easier methode to implement it.
found any solution? I also have this error
[1.15.2] New MemoryModuleType and SensorType
in Modder Support
Posted
Is that I'm a little beginner, so I would like to know how it would be to insert a new sensor or module, in this case, just his registration line