2013-08-27 12:19:05 [INFO] [STDERR] Exception in thread "Minecraft main thread" java.lang.IncompatibleClassChangeError: Expecting non-static method net.minecraft.client.gui.ScaledResolution.func_78326_a()I 2013-08-27 12:19:05 [INFO] [STDERR] at net.minecraft.client.Minecraft.func_71357_I(Minecraft.java:513) 2013-08-27 12:19:05 [INFO] [STDERR] at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407) 2013-08-27 12:19:05 [INFO] [STDERR] at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56) 2013-08-27 12:19:05 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:733) 2013-08-27 12:19:05 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
package net.minecraft.client.gui; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.settings.GameSettings; import net.minecraft.util.MathHelper; @SideOnly(Side.CLIENT) public class ScaledResolution { private static int scaledWidth; private static int scaledHeight; private double scaledWidthD; private double scaledHeightD; private int scaleFactor; public ScaledResolution(GameSettings par1GameSettings, int par2, int par3) { this.scaledWidth = par2; this.scaledHeight = par3; this.scaleFactor = 1; int k = par1GameSettings.guiScale; if (k == 0) { k = 1000; } while (this.scaleFactor < k && this.scaledWidth / (this.scaleFactor + 1) >= 320 && this.scaledHeight / (this.scaleFactor + 1) >= 240) { ++this.scaleFactor; } this.scaledWidthD = (double)this.scaledWidth / (double)this.scaleFactor; this.scaledHeightD = (double)this.scaledHeight / (double)this.scaleFactor; this.scaledWidth = MathHelper.ceiling_double_int(this.scaledWidthD); this.scaledHeight = MathHelper.ceiling_double_int(this.scaledHeightD); } public static int getScaledWidth() { return scaledWidth; } public static int getScaledHeight() { return scaledHeight; } public double getScaledWidth_double() { return this.scaledWidthD; } public double getScaledHeight_double() { return this.scaledHeightD; } public int getScaleFactor() { return this.scaleFactor; } }
public static int getScaledWidth() {
return scaledWidth;
}
public static int getScaledHeight()
{
return scaledHeight;
}
int line = 10;
int line2 = 2;
int width1 = ScaledResolution.getScaledWidth();
int height1 = ScaledResolution.getScaledHeight();
fontrenderer.drawStringWithShadow("Revolt v1.0", ScaledResolution.getScaledWidth() - fontrenderer.getStringWidth("Revolt v1.0") - 13, line2, 0xFF00FFFF);line2 += line;

private ScaledResolution scaledResolution; //in your class's constructor place this line of code this.scaledResolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight); //then you can use scaledResolution.getScaledHeight();//and anything else like that in the class.