Hey guys,
So, I'm creating a mod that uses code from another mod (using build.gradle to put it into my build path). One of my event handlers listens for an event made by the other mod. For the longest time, I wasn't able to get it to work, until I realised that the other mod had it's own EVENT_BUS made and posted their events on that bus instead of the one created by MinecraftForge. So, I registered my event handler using the other mod's bus and finally managed to get it working... in single player, that is.
The main problem comes when I test it on a server. When I entered a server (a pre-existing one, not a test server), the event handler doesn't get called at all. My initial suspicions were that, although I did register the handler on the mod bus, it didn't actually register on the server, so I made my handler hook to a general Event class and printed out the argument passed to it to see if it caught any event posted by the mod at all and it did catch some Effects and other events. So now my main suspicion is that the event I'm trying to hook is being posted on the server instead of the client. Should I use packets or just create my own test server? Or is there something else I'm missing.
I created my Event Handlers on a separate class and registered them at Pre-Init in my @Mod class. To reiterate, the event handler works, but only in SP. It's a really simple setup but if you still want to see my code then I'll gladly post it.