Commit Graph

5 Commits

Author SHA1 Message Date
Shadowfacts 7cebe692e7
Only unregister static/register object event handlers unless appropriate handler methods are detected 2018-06-11 17:21:43 -04:00
Shadowfacts ecf20f1a76
Don't crash on failed registration
I think Forge is doing something weird with registration event handlers causing ClassNotFoundExceptions

Closes #37
2018-06-09 17:32:39 -04:00
Shadowfacts c64538e7b0
Remove unnecessary elvis operator 2018-06-09 15:28:51 -04:00
Kitten be61809a7b Unregister class reference from the event bus (#36)
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.
2018-06-09 15:08:40 -04:00
gegy1000 438c604d52 Object EventBusSubscriber registration (#34)
* Object EventBusSubscriber registration

* Register from construction and handle companion objects

* Rename construction event listener

* Syntax changes

* Add test mod
2018-05-21 09:36:15 -04:00