Minecraftforge: [1.9] SoundEvents (and Enchantments and PotionTypes) need a FML registry

Created on 19 Mar 2016  路  7Comments  路  Source: MinecraftForge/MinecraftForge

SoundEvent currently uses a vanilla namespaced registry, with a statically incrementing integer ID.

Would it be in our interest to put an FML registry on this as well, so servers and clients with mismatching mod sets (think MATmos or something clientside only) wouldn't get wrong sounds playing? (the sound packet uses this integer ID, so they must match on both sides)

Most helpful comment

Another note is that its currently impossible to register new SoundEvents without reflection as the register method is private :P. The registry itself its public but to access the next ID you still need reflection since it's also private :P

But mainly my concern is with the original thing, and also adding FML registries for everything vanilla has a registry for that we haven't fml-ed yet (Enchantments, PotionTypes, SoundEvents)

All 7 comments

Another note is that its currently impossible to register new SoundEvents without reflection as the register method is private :P. The registry itself its public but to access the next ID you still need reflection since it's also private :P

But mainly my concern is with the original thing, and also adding FML registries for everything vanilla has a registry for that we haven't fml-ed yet (Enchantments, PotionTypes, SoundEvents)

\o/

Perfect examples of how stupid simple it is now that we have all the mechanics in place for registries in generic ways <3

Has a work-around been found for this?

They have registries.

@Spaceshipable see ForgeRegistries class

Got that all working now. Thanks.

Was this page helpful?
0 / 5 - 0 ratings