From 16ba9b7c58ca44658430712fe9215e91bfb76b56 Mon Sep 17 00:00:00 2001 From: PeytonPlayz595 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Tue, 6 Aug 2024 03:15:07 -0400 Subject: [PATCH] fix some things --- src/net/minecraft/client/Minecraft.java | 3 +++ src/net/minecraft/src/ClippingHelper.java | 11 +++++++++-- src/net/minecraft/src/RenderHelper.java | 1 + src/net/minecraft/src/WorldRenderer.java | 5 ++++- src/org/lwjgl/opengl/GL11.java | 4 ++-- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/net/minecraft/client/Minecraft.java b/src/net/minecraft/client/Minecraft.java index 0364f74..2f0ee05 100644 --- a/src/net/minecraft/client/Minecraft.java +++ b/src/net/minecraft/client/Minecraft.java @@ -194,6 +194,9 @@ public class Minecraft implements Runnable { this.checkGLError("Post startup"); this.ingameGUI = new GuiIngame(this); + + GL11.anisotropicPatch(GL11.EaglerAdapterImpl2.glNeedsAnisotropicFix()); + this.displayGuiScreen(new GuiMainMenu()); } diff --git a/src/net/minecraft/src/ClippingHelper.java b/src/net/minecraft/src/ClippingHelper.java index 356fa4f..3425b75 100644 --- a/src/net/minecraft/src/ClippingHelper.java +++ b/src/net/minecraft/src/ClippingHelper.java @@ -7,8 +7,15 @@ public class ClippingHelper { public float[] clippingMatrix = new float[16]; public boolean isBoxInFrustum(double var1, double var3, double var5, double var7, double var9, double var11) { - for(int var13 = 0; var13 < 6; ++var13) { - if((double)this.frustum[var13][0] * var1 + (double)this.frustum[var13][1] * var3 + (double)this.frustum[var13][2] * var5 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var7 + (double)this.frustum[var13][1] * var3 + (double)this.frustum[var13][2] * var5 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var1 + (double)this.frustum[var13][1] * var9 + (double)this.frustum[var13][2] * var5 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var7 + (double)this.frustum[var13][1] * var9 + (double)this.frustum[var13][2] * var5 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var1 + (double)this.frustum[var13][1] * var3 + (double)this.frustum[var13][2] * var11 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var7 + (double)this.frustum[var13][1] * var3 + (double)this.frustum[var13][2] * var11 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var1 + (double)this.frustum[var13][1] * var9 + (double)this.frustum[var13][2] * var11 + (double)this.frustum[var13][3] <= 0.0D && (double)this.frustum[var13][0] * var7 + (double)this.frustum[var13][1] * var9 + (double)this.frustum[var13][2] * var11 + (double)this.frustum[var13][3] <= 0.0D) { + for (int var13 = 0; var13 < 6; ++var13) { + if ((double) this.frustum[var13][0] * var1 + (double) this.frustum[var13][1] * var3 + (double) this.frustum[var13][2] * var5 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var7 + (double) this.frustum[var13][1] * var3 + (double) this.frustum[var13][2] * var5 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var1 + (double) this.frustum[var13][1] * var9 + (double) this.frustum[var13][2] * var5 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var7 + (double) this.frustum[var13][1] * var9 + (double) this.frustum[var13][2] * var5 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var1 + (double) this.frustum[var13][1] * var3 + (double) this.frustum[var13][2] * var11 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var7 + (double) this.frustum[var13][1] * var3 + (double) this.frustum[var13][2] * var11 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var1 + (double) this.frustum[var13][1] * var9 + (double) this.frustum[var13][2] * var11 + (double) this.frustum[var13][3] <= 0.0D + && (double) this.frustum[var13][0] * var7 + (double) this.frustum[var13][1] * var9 + (double) this.frustum[var13][2] * var11 + (double) this.frustum[var13][3] <= 0.0D) { return false; } } diff --git a/src/net/minecraft/src/RenderHelper.java b/src/net/minecraft/src/RenderHelper.java index 80e6efb..db16347 100644 --- a/src/net/minecraft/src/RenderHelper.java +++ b/src/net/minecraft/src/RenderHelper.java @@ -17,6 +17,7 @@ public class RenderHelper { GL11.glEnable(GL11.GL_COLOR_MATERIAL); GL11.glColorMaterial(GL11.GL_FRONT_AND_BACK, GL11.GL_AMBIENT_AND_DIFFUSE); GL11.copyModelToLightMatrix2(); + //GL11.flipSecondLightMatrix(); GL11.flipBothLightMatrix(); } } diff --git a/src/net/minecraft/src/WorldRenderer.java b/src/net/minecraft/src/WorldRenderer.java index 040477e..a0f450f 100644 --- a/src/net/minecraft/src/WorldRenderer.java +++ b/src/net/minecraft/src/WorldRenderer.java @@ -94,6 +94,7 @@ public class WorldRenderer { this.tileEntityRenderers.clear(); byte var8 = 1; ChunkCache var9 = new ChunkCache(this.worldObj, var1 - var8, var2 - var8, var3 - var8, var4 + var8, var5 + var8, var6 + var8); + GL11.hintAnisotropicFix(true); RenderBlocks var10 = new RenderBlocks(var9); for(int var11 = 0; var11 < 2; ++var11) { @@ -146,8 +147,10 @@ public class WorldRenderer { if(!var12) { break; - } + } } + + GL11.hintAnisotropicFix(false); HashSet var22 = new HashSet(); var22.addAll(this.tileEntityRenderers); diff --git a/src/org/lwjgl/opengl/GL11.java b/src/org/lwjgl/opengl/GL11.java index 408341c..7e453ee 100644 --- a/src/org/lwjgl/opengl/GL11.java +++ b/src/org/lwjgl/opengl/GL11.java @@ -1576,12 +1576,12 @@ public class GL11 implements JSObject { public static final boolean glGetQueryResult(int obj) { QueryGL q = queryObjs.get(obj); - return _wglGetQueryObjecti(q, _wGL_QUERY_RESULT) > 0; + return _wglGetQueryObjecti(q, _wGL_QUERY_RESULT) > 0; } public static final boolean glGetQueryResultAvailable(int obj) { QueryGL q = queryObjs.get(obj); - return _wglGetQueryObjecti(q, _wGL_QUERY_RESULT_AVAILABLE) >= 0; + return _wglGetQueryObjecti(q, _wGL_QUERY_RESULT_AVAILABLE) > 0; } public static final void glGetQueryResult(int in, IntBuffer out) {