aboutsummaryrefslogtreecommitdiff
path: root/utils/renderLib2d.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-23 23:57:38 +0800
committerGitHub <noreply@github.com>2021-12-23 23:57:38 +0800
commitaf90f8e220733b26098d3c4f4758bccf9f08908c (patch)
treec5f55070ce427198e2cd17af1742d78643278453 /utils/renderLib2d.js
parentb3f12aa6dffc7fc5841e6d7863269740079a9ef7 (diff)
parentc2536f244242d3df564fe6bf08504f3c2b6a4f7f (diff)
downloadSoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.tar.gz
SoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.tar.bz2
SoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.zip
Merge pull request #2 from Soopyboo32:Chattriggers2
Support chattriggers 2
Diffstat (limited to 'utils/renderLib2d.js')
-rw-r--r--utils/renderLib2d.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/renderLib2d.js b/utils/renderLib2d.js
index 913475b..6721760 100644
--- a/utils/renderLib2d.js
+++ b/utils/renderLib2d.js
@@ -10,10 +10,6 @@
import { f, m } from "../mappings/mappings";
-
-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;
@@ -21,6 +17,11 @@ const modelViewMatrix = BufferUtils.createFloatBuffer(16);
const projectionMatrix = BufferUtils.createFloatBuffer(16);
const viewportDims = BufferUtils.createIntBuffer(16);
+if(!GlStateManager){
+ var GL11 = Java.type("org.lwjgl.opengl.GL11"); //using var so it goes to global scope
+ var GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager");
+}
+
const ScaledResolution = net.minecraft.client.gui.ScaledResolution;
const AxisAlignedBB = Java.type("net.minecraft.util.AxisAlignedBB")