diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-23 23:57:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 23:57:38 +0800 |
commit | af90f8e220733b26098d3c4f4758bccf9f08908c (patch) | |
tree | c5f55070ce427198e2cd17af1742d78643278453 | |
parent | b3f12aa6dffc7fc5841e6d7863269740079a9ef7 (diff) | |
parent | c2536f244242d3df564fe6bf08504f3c2b6a4f7f (diff) | |
download | SoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.tar.gz SoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.tar.bz2 SoopyV2-af90f8e220733b26098d3c4f4758bccf9f08908c.zip |
Merge pull request #2 from Soopyboo32:Chattriggers2
Support chattriggers 2
-rw-r--r-- | features/cosmetics/cosmetic/dragon/dragonWings.js | 5 | ||||
-rw-r--r-- | utils/renderLib2d.js | 9 | ||||
-rw-r--r-- | utils/renderUtils.js | 7 |
3 files changed, 13 insertions, 8 deletions
diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/features/cosmetics/cosmetic/dragon/dragonWings.js index bb3010e..08a45cc 100644 --- a/features/cosmetics/cosmetic/dragon/dragonWings.js +++ b/features/cosmetics/cosmetic/dragon/dragonWings.js @@ -3,7 +3,10 @@ import Cosmetic from "../../cosmetic.js"; const ModelDragon = Java.type("net.minecraft.client.model.ModelDragon") -const GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager"); +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 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") diff --git a/utils/renderUtils.js b/utils/renderUtils.js index 956df0b..1491756 100644 --- a/utils/renderUtils.js +++ b/utils/renderUtils.js @@ -1,8 +1,9 @@ const { f, m } = require("../../mappings/mappings"); -const GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager"); -const GL11 = Java.type("org.lwjgl.opengl.GL11"); - +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 |