Posted December 2, 20177 yr 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!
December 2, 20177 yr The client does not exist within the server, I think your code is reaching across sides.
December 2, 20177 yr 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.
December 2, 20177 yr Author 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.