From 0944f0576c9ef34b0a6a19fea09f3bec3f062fb7 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Fri, 12 Nov 2021 23:01:48 +0800 Subject: made cosmetics un-scuffed --- features/cosmetics/dragonWings.js | 9 ++++++--- features/cosmetics/index.js | 10 ++++++++-- features/cosmetics/textures/Enderdragon_png.png | Bin 0 -> 11845 bytes features/streamsGUI/index.js | 16 ++++++++-------- 4 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 features/cosmetics/textures/Enderdragon_png.png (limited to 'features') diff --git a/features/cosmetics/dragonWings.js b/features/cosmetics/dragonWings.js index d523a46..8f960cf 100644 --- a/features/cosmetics/dragonWings.js +++ b/features/cosmetics/dragonWings.js @@ -1,7 +1,6 @@ import Cosmetic from "./cosmetic"; const ModelDragon = Java.type("net.minecraft.client.model.ModelDragon") -const ResourceLocation = Java.type("net.minecraft.util.ResourceLocation") const GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager"); const Essential = Java.type("gg.essential.Essential") @@ -9,9 +8,10 @@ const EssentialCosmeticSlot = Java.type("gg.essential.cosmetics.CosmeticSlot") const FACING = Java.type("net.minecraft.block.BlockDirectional").field_176387_N let dragon = new ModelDragon(0) //too lazy to make my own model so i just yoink it from modelDragon lmfao -let textures = new ResourceLocation("textures/entity/enderdragon/dragon.png") +let textures = new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/cosmetics/textures/Enderdragon_png.png"))) let wing = getField(dragon, "field_78225_k") let wingTip = getField(dragon, "field_78222_l") +const GL11 = Java.type("org.lwjgl.opengl.GL11"); class DragonWings extends Cosmetic { constructor(player, parent) { @@ -107,6 +107,7 @@ class DragonWings extends Cosmetic { } GlStateManager.func_179094_E(); // pushMatrix + Tessellator.colorize(1, 1, 1) if(this.player !== Player){ Tessellator.translate( @@ -115,7 +116,7 @@ class DragonWings extends Cosmetic { (this.player.getPlayer().field_70136_U + (this.player.getPlayer().field_70161_v-this.player.getPlayer().field_70136_U) * ticks) - (Player.getPlayer().field_70136_U + (Player.getPlayer().field_70161_v-Player.getPlayer().field_70136_U) * ticks)) } - Client.getMinecraft().field_71446_o.func_110577_a(textures) //bind texture + Tessellator.bindTexture(textures) //bind texture if(this.player.getPlayer().field_70154_o){ rotation = this.player.getPlayer().field_70759_as+(this.player.getPlayer().field_70759_as-this.player.getPlayer().field_70758_at)*ticks @@ -259,6 +260,7 @@ class DragonWings extends Cosmetic { wingTip.field_78808_h = -((Math.sin((this.animOffset))*0.5 + 0.3)) } + GL11.glDisable(GL11.GL_CULL_FACE) Tessellator.translate(0.1, 0, 0) Tessellator.scale(this.settings.scale, this.settings.scale, this.settings.scale) wing.func_78791_b(1) //render left wing @@ -267,6 +269,7 @@ class DragonWings extends Cosmetic { Tessellator.scale(-1, 1, 1) wing.func_78791_b(1) //render right wing + GL11.glEnable(GL11.GL_CULL_FACE) GlStateManager.func_179121_F(); // popMatrix } diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js index c2bd10d..c8504c3 100644 --- a/features/cosmetics/index.js +++ b/features/cosmetics/index.js @@ -130,6 +130,12 @@ class Cosmetics extends Feature { } tick(){ + this.restoreEssentialCosmetics() + + this.filterUnloadedCosmetics(true) + } + + restoreEssentialCosmetics(){ World.getAllPlayers().forEach(p=>{ if(!p.getPlayer().getEssentialCosmetics()) return @@ -147,8 +153,6 @@ class Cosmetics extends Feature { } } }) - - this.filterUnloadedCosmetics(true) } renderWorld(ticks){ @@ -164,6 +168,8 @@ class Cosmetics extends Feature { } onDisable(){ + this.restoreEssentialCosmetics() + this.initVariables() } } diff --git a/features/cosmetics/textures/Enderdragon_png.png b/features/cosmetics/textures/Enderdragon_png.png new file mode 100644 index 0000000..aad6401 Binary files /dev/null and b/features/cosmetics/textures/Enderdragon_png.png differ diff --git a/features/streamsGUI/index.js b/features/streamsGUI/index.js index 0277eb4..9ac7bc0 100644 --- a/features/streamsGUI/index.js +++ b/features/streamsGUI/index.js @@ -3,11 +3,11 @@ import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; import Feature from "../../featureClass/class"; import GuiPage from "../soopyGui/GuiPage"; -// import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; -// import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; -// import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement"; -// import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; -// import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; +import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; +import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; +import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement"; +import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; +import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; class StreamsGui extends Feature { constructor() { @@ -17,7 +17,7 @@ class StreamsGui extends Feature { onEnable(){ this.initVariables() - // this.GuiPage = new StreamPage() + this.GuiPage = new StreamPage() } initVariables(){ @@ -29,7 +29,7 @@ class StreamsGui extends Feature { } } -/* + class StreamPage extends GuiPage { constructor(){ super(7) @@ -129,7 +129,7 @@ class StreamElement extends SoopyBoxElement { return this } -}*/ +} module.exports = { class: new StreamsGui() -- cgit