
AquatuzMagnus
Members-
Content Count
2 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout AquatuzMagnus
-
Rank
Tree Puncher
-
[Solved] Forge 1.12.2 Simple HUD Help
AquatuzMagnus replied to AquatuzMagnus's topic in Modder Support
Ok I actually fixed it by just changing this: ScaledResolution scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); To: ScaledResolution scaled = new ScaledResolution(mc); Not sure why that worked, but it did. -
I am using this code: package com.AquatuzMagnus.avatarmod.client.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.ScaledResolution; public class BendingGuiOverlay extends Gui { String text = "Hello world!"; public BendingGuiOverlay(Minecraft mc) { ScaledResolution scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); int width = scaled.getScaledWidth(); int height = scaled.getScaledHeight(); drawCenteredString(mc.fontRenderer, text, width / 2, (height / 2) - 4, Integer.parseInt("FFAA00", 16)); } } To make a simple HUD but I am getting an error on this line: ScaledResolution scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); It says: "The Constructor ScaledResolution(Minecraft mc, int, int) is undefined" I got the code from a tutorial here: https://emxtutorials.wordpress.com/simple-in-game-gui-overlay/