shadowfacts / Forgelin

Fork of Emberwalker's Forgelin with some sprinkles on top.
Other
95 stars 30 forks source link

Unregister class reference from the event bus #36

Closed ChloeDawn closed 6 years ago

ChloeDawn commented 6 years ago

When Forgelin registers the object instance of an @EventBusSubscriber annotated object class to the event bus, it does not unregister the static class reference that Forge will have registered before Forgelin parses the annotation candidates. This could potentially cause issues, and breaks expectations/semantics from having the annotation register a class both statically and as an instance. This pull request adds a call to MinecraftForge.EVENT_BUS#unregister to remove the Forge-registered class reference before registering the instance reference.

shadowfacts commented 6 years ago

Awesome, thanks!