Update #49 - Fix unclosable pause menu glitch

This commit is contained in:
lax1dude
2025-01-26 15:23:47 -08:00
parent ed97c1ac00
commit ad900211dd
47 changed files with 1051 additions and 274 deletions

View File

@ -268,16 +268,19 @@ public class GlStateManager {
private static final Vector4f paramVector4 = new Vector4f();
public static final void enableMCLight(int light, float diffuse, double dirX,
double dirY, double dirZ, double dirW) {
if(dirW != 0.0) throw new IllegalArgumentException("dirW must be 0.0!");
paramVector4.x = (float)dirX;
paramVector4.y = (float)dirY;
paramVector4.z = (float)dirZ;
paramVector4.w = (float)dirW;
paramVector4.w = (float)0.0f;
Matrix4f.transform(modelMatrixStack[modelMatrixStackPointer], paramVector4, paramVector4);
paramVector4.normalise();
Vector4f dest = stateLightsStack[stateLightsStackPointer][light];
dest.x = paramVector4.x;
dest.y = paramVector4.y;
dest.z = paramVector4.z;
float len = MathHelper.sqrt_float(paramVector4.x * paramVector4.x
+ paramVector4.y * paramVector4.y
+ paramVector4.z * paramVector4.z);
dest.x = paramVector4.x / len;
dest.y = paramVector4.y / len;
dest.z = paramVector4.z / len;
dest.w = diffuse;
stateLightsEnabled[stateLightsStackPointer][light] = true;
++stateLightingSerial[stateLightsStackPointer];
@ -1267,6 +1270,10 @@ public class GlStateManager {
return modelMatrixStack[modelMatrixStackPointer];
}
public static final Matrix4f getProjectionReference() {
return projectionMatrixStack[projectionMatrixStackPointer];
}
public static void recompileShaders() {
FixedFunctionPipeline.flushCache();
}

View File

@ -18,7 +18,7 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
*
*/
public class WorldVertexBufferUploader {
public void func_181679_a(WorldRenderer parWorldRenderer) {
public static void func_181679_a(WorldRenderer parWorldRenderer) {
int cunt = parWorldRenderer.getVertexCount();
if (cunt > 0) {
VertexFormat fmt = parWorldRenderer.getVertexFormat();

View File

@ -1,6 +1,5 @@
package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture;
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
import net.minecraft.client.Minecraft;
import net.minecraft.util.MathHelper;

View File

@ -1,6 +1,5 @@
package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture;
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
import net.minecraft.client.Minecraft;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;