diff --git a/src/minecraft/net/minecraft/src/GuiIngame.java b/src/minecraft/net/minecraft/src/GuiIngame.java index e5758d9..22e211e 100644 --- a/src/minecraft/net/minecraft/src/GuiIngame.java +++ b/src/minecraft/net/minecraft/src/GuiIngame.java @@ -34,6 +34,11 @@ public class GuiIngame extends Gui this.persistantChatGUI = new GuiNewChat(par1Minecraft); } + private char getColorCodeFromPrecision(double precision) { + if(precision <= 0.03125D /* 1/32 */) return 'a'; + else return precision > 0.25 /* 1/2 */ ? 'c' : 'e'; + } + /** * Render the ingame overlay with quick icon bar, ... */ @@ -423,6 +428,13 @@ public class GuiIngame extends Gui } this.drawString(var8, String.format("ws: %.3f, fs: %.3f, g: %b", new Object[] {Float.valueOf(this.mc.thePlayer.capabilities.getWalkSpeed()), Float.valueOf(this.mc.thePlayer.capabilities.getFlySpeed()), Boolean.valueOf(this.mc.thePlayer.onGround)}), 2, 104, 14737632); + int maxBit = x.max(z).bitLength(); + + double doublePrecision = Math.pow(2, (maxBit - 53)), + floatPrecision = Math.pow(2, (maxBit - 24)); + + this.drawString(var8, "Current precision: \247" + this.getColorCodeFromPrecision(doublePrecision) + doublePrecision + "\247r (float: \247" + this.getColorCodeFromPrecision(floatPrecision) + floatPrecision + "\247r)", 2, 114, 14737632); + GL11.glPopMatrix(); this.mc.mcProfiler.endSection(); } diff --git a/src/minecraft/net/minecraft/src/WorldRenderer.java b/src/minecraft/net/minecraft/src/WorldRenderer.java index 4768e87..f818f48 100644 --- a/src/minecraft/net/minecraft/src/WorldRenderer.java +++ b/src/minecraft/net/minecraft/src/WorldRenderer.java @@ -145,7 +145,7 @@ public class WorldRenderer var21.addAll(this.tileEntityRenderers); this.tileEntityRenderers.clear(); byte var8 = 1; - ChunkCache var9 = new ChunkCache(this.worldObj, var1.subtract(BigInteger.ONE), var2 - var8, var3.subtract(BigInteger.ONE), var4.add(BigInteger.ONE), var5 + var8, var6.add(BigInteger.ONE)); + IBlockAccess var9 = new ChunkCache(this.worldObj, var1.subtract(BigInteger.ONE), var2 - var8, var3.subtract(BigInteger.ONE), var4.add(BigInteger.ONE), var5 + var8, var6.add(BigInteger.ONE)); if (!var9.extendedLevelsInChunkCache()) {