aboutsummaryrefslogtreecommitdiff
path: root/utils/renderLib2d.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-11 15:30:20 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-11 15:30:20 +0800
commit9e7bedbd8bedd5599a756cce9cad76754f9a2e74 (patch)
treee78d23b5e52859c029118d647511345a8fb0d1e2 /utils/renderLib2d.js
parentcd85af68f5af559d869097306cf063a628b19f6f (diff)
downloadSoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.tar.gz
SoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.tar.bz2
SoopyV2-9e7bedbd8bedd5599a756cce9cad76754f9a2e74.zip
Fixes to many things
Diffstat (limited to 'utils/renderLib2d.js')
-rw-r--r--utils/renderLib2d.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/renderLib2d.js b/utils/renderLib2d.js
index b2defd1..e9769b7 100644
--- a/utils/renderLib2d.js
+++ b/utils/renderLib2d.js
@@ -8,6 +8,8 @@
//TODO: just require the module when ct 2.0 comes out
+const GL11 = Java.type("org.lwjgl.opengl.GL11");
+const GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager");
const BufferUtils = org.lwjgl.BufferUtils;
const Project = org.lwjgl.util.glu.Project;
@@ -19,18 +21,18 @@ const viewportDims = BufferUtils.createIntBuffer(16);
const ScaledResolution = net.minecraft.client.gui.ScaledResolution;
register('renderWorld', () => {
- Tessellator.pushMatrix();
+ GlStateManager.func_179094_E();
- let x = Player.getRenderX();
- let y = Player.getRenderY();
- let z = Player.getRenderZ();
+ let x = Player.getX();
+ let y = Player.getY();
+ let z = Player.getZ();
Tessellator.translate(-x, -y, -z);
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelViewMatrix);
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);
- Tessellator.popMatrix();
+ GlStateManager.func_179121_F();
GL11.glGetInteger(GL11.GL_VIEWPORT, viewportDims);
});