Jump to content

MC Crashes when I join a server / world with my mod (1.8.9)


Recommended Posts

Posted

My mod is made for Hypixel, when you type /tip all or when you get a kill, usually there's a booster on and it fills your chat with a long message, this mod gets all the coins collected and compacts it to one small message. The error when I try to go to Hypixel or a World is:

 

The game crashed whilst unexpected error Error: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft;

 

The lines probably causing this is:

@SubscribeEvent public void render(RenderGameOverlayEvent event) { if (event.isCancelable() || event.type != ElementType.EXPERIENCE) { return; } FontRenderer fRender = Minecraft.getMinecraft().fontRendererObj; fRender.drawString(EnumChatFormatting.GREEN + "Coins: " + EnumChatFormatting.WHITE + totalCoins, 5, 5, 0); }

Please help!

Posted
6 hours ago, ConorTheDev said:

Minecraft.getMinecraft()

You can't have that on the server. I think you need to hide your method implementation in your client proxy.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
1 hour ago, jeffryfisher said:

You can't have that on the server. I think you need to hide your method implementation in your client proxy.

I figured it out, I was building from inside my IDE, I should've run: "gradlew build" instead.

 

Thanks for the help though!

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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