aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/renderLib2d.js5
-rw-r--r--utils/renderUtils.js4
2 files changed, 9 insertions, 0 deletions
diff --git a/utils/renderLib2d.js b/utils/renderLib2d.js
index 5c930aa..6721760 100644
--- a/utils/renderLib2d.js
+++ b/utils/renderLib2d.js
@@ -17,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")
diff --git a/utils/renderUtils.js b/utils/renderUtils.js
index db1df8d..1491756 100644
--- a/utils/renderUtils.js
+++ b/utils/renderUtils.js
@@ -1,5 +1,9 @@
const { f, m } = require("../../mappings/mappings");
+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");
+}
module.exports = {
/* accepts parameters