TheF1xer / GateClient-1.12.2

Gate Client: A Forge Utility Mod for Minecraft 1.12.2
Other
33 stars 5 forks source link

"""Event bus""" is terrible #8

Closed Doogie13 closed 2 years ago

Doogie13 commented 2 years ago

https://github.com/TheF1xer/GateClient/blob/main/src/main/java/me/thef1xer/gateclient/handlers/ModuleEventHandler.java why not just use the forge event bus in modules and onEnable register and onDisable unregister modules

TheF1xer commented 2 years ago

I had it that way before, but I changed it because this a) gives me a lot of control over the order in which the methods are called b) takes less lines of code c) allows me cancel events in the way that I do with my updateWalkingPlayerEvent d) makes looping through, for example, all loaded entites a lot better for performance (I just have to do it one time).

I was a change that I wanted to do for a long time because it made more sense in my head and I've been having 0 troubles with it and believe me that some stuff what a lot worse when I had it the other way