Botania

Botania

133M Downloads

Loading of client classes in common classes

williewillus opened this issue ยท 0 comments

commented

This is a rather large issue/change, so I held off on changing it in the port and decided to report it here. I also wasn't sure if this was just an intricacy of the codebase that I didn't know about.

Several of the Botania items implement interfaces whose methods supply client-only classes such as net.minecraft.client.Minecraft, ScaledResolution, etc.

This became a problem for me when I marked that item (in this case, BlockSpecialFlower), as an EVENT_BUS handler. This causes FML to scan all methods and on the server when it sees the method with Minecraft it will panic and crash. The same will happen with all things that scan the methods (ASM, reflection of any sort, etc.).

Not quite sure how to handle it so I'm reporting it here, for now I've just moved the event handlers to a separate class, maintaining the status quo.