jonesto95 Posted July 10, 2017 Posted July 10, 2017 I've compiled my mod, and I've thrown it on a server I'm hosting, and I'm running into NoSuchMethodExceptions for client @SideOnly methods, and NoClassDefFoundError: net/minecraft/client/Minecraft, which I believe tells me I've created a client-only mod. I don't know how to make it multiplayer-compatible though...how do I do that? Quote
shadowfacts Posted July 10, 2017 Posted July 10, 2017 What client-only methods are you using? How to fix it will depend on which ones you're using. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
jonesto95 Posted July 10, 2017 Author Posted July 10, 2017 It's an entity that can be controlled like a boat, the method simply gets the user's input and sets booleans accordingly, taken from the EntityBoat class. @SideOnly(Side.CLIENT) public void updateInputs() { leftInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindLeft); rightInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindRight); forwardInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindForward); backInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindBack); } Strangely enough, I didn't find a call to the EntityBoat's version of the method anywhere within that class, so I added one in mine elsewhere in the code public void onUpdate() { previousStatus = status; status = getRaceCartStatus(); updateInputs(); ... which is causing the NoSuchMethodException. If I take out that call, I get the NoClassDefFoundError, looking for net/minecraft/client/Minecraft Quote
IceMetalPunk Posted July 10, 2017 Posted July 10, 2017 For future reference, if you're using Eclipse as your IDE, you can right-click any field or method name and click "Open Call Hierarchy", and Eclipse will show you exactly what classes are referencing the field or calling the method, and where. It's a very useful research and debugging tool Quote Whatever Minecraft needs, it is most likely not yet another tool tier.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.