From efe032c4c655d38c659b605c6bcab0a03ab14075 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 22 Dec 2021 22:14:23 +0800 Subject: yes --- utils/renderLib2d.js | 4 ---- 1 file changed, 4 deletions(-) (limited to 'utils/renderLib2d.js') diff --git a/utils/renderLib2d.js b/utils/renderLib2d.js index 913475b..5c930aa 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; -- cgit From c2536f244242d3df564fe6bf08504f3c2b6a4f7f Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Thu, 23 Dec 2021 23:57:05 +0800 Subject: support both chattriggers 2 and 1 --- features/cosmetics/cosmetic/dragon/dragonWings.js | 4 ++++ utils/renderLib2d.js | 5 +++++ utils/renderUtils.js | 4 ++++ 3 files changed, 13 insertions(+) (limited to 'utils/renderLib2d.js') diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/features/cosmetics/cosmetic/dragon/dragonWings.js index a5aeb68..08a45cc 100644 --- a/features/cosmetics/cosmetic/dragon/dragonWings.js +++ b/features/cosmetics/cosmetic/dragon/dragonWings.js @@ -3,6 +3,10 @@ import Cosmetic from "../../cosmetic.js"; const ModelDragon = Java.type("net.minecraft.client.model.ModelDragon") +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 Essential = Java.type("gg.essential.Essential") const EssentialCosmeticSlot = Java.type("gg.essential.cosmetics.CosmeticSlot") 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 -- cgit