Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

  • Author

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

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 :)

Whatever Minecraft needs, it is most likely not yet another tool tier.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.