From e880342a939b2223f6b30640d9a9cfeea356ee62 Mon Sep 17 00:00:00 2001 From: ThisIsALegitUsername Date: Tue, 27 Dec 2022 21:34:25 +0000 Subject: [PATCH] Port keystrokes --- .../resent/module/impl/hud/KeyStrokes.class | Bin 2983 -> 9416 bytes .../resent/module/impl/hud/KeyStrokes.java | 33 +++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bin/main/dev/resent/module/impl/hud/KeyStrokes.class b/bin/main/dev/resent/module/impl/hud/KeyStrokes.class index 4bd7831b47801e80dcc4095c4f9d23f6287a2fe0..a305c21ead5e998096b4e4e1f3bfc0510aee8cb5 100644 GIT binary patch literal 9416 zcmb_i33yc3bv|b_(t8>`U_25A3N#2?Fz^d6EXrB4&}m z8+ZX5JH*Bd2HT0<%`}bcCMgoKU8iZfxrq~ZUmbT#-6rjqu5LqHhy3ThH<}R=l1z)S z?so3k?tjib_la-*_^q!I(OQ04BNx-skTu{>SV=3E@<-#Lbj0$9qx}(oZ#v|^%Q_NB zCE|TnQX@Ch&ErWs&7|dTwPGPF(X2Kz=?yyqZPhz!?_|2AY5a}}m{&5nqFqd-O)(2f zgkx4$!t74@yCPxHsyQ+S%2gL?_{Nv{bU!48;dQk__K#iAFgFWTe1QD@R0EJQ7cc zX3`4V9%n|gJ2C}Jy80l=+jP(zF#YLNIO1;#CsR|{w?Uu!UE7#$%60!l)Ri8}quWK< zJD4_<<+uyD1tKb^WYEyiQNG(l>uIA#8<-YOjzEJdX%qa|W2Ht>iDN4(p9;C+!7T=9 zq-#_K!*aZkfz?>>>QsYsY&FBN&iJ5Ca0Yp3E7ggu+nLHHvQ=SAfyJ>NritJNg9^!` z(_ILNfCPk0HXBqVlPv&ATQ)jm>28AzSqcCVjR+N)+hx!UncE`>Xs#(m;FNa7)3KD5 zkmYuRX3FwjEVqtd{)|DhWch#yvks?911ipBr)iLvJQ^YX7f#@noM6)lU~>l$m>TsU zmaa5cr?40pH6sz75cCB*;t33NiekFSO!NTSofH=jA|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R}Ej4cvg6nmKC1%`R7fX2s;;-A~O=lZjwk_}nf&3fxRtq4`6q$D-5i>xLrD zw<~aimHs&#&JB~JPv%1#zsG~^WSZxseg;Q>tkfTY>gf=dMb@8VdzY*E>~{;3Kutpz zvk9oeFpSWu1ZAj@q)P(SoE*(%J(nNl^5a~NArfy?&bDLXCJ1B229cOYx2HMRWOpZKVkam_~qYW_HTzVN6!&w zslydo*ZW>D?`mb>!_@(V(tilw6(GzPB3vWxq8y44ZWJQ?@IMfKE=2h8fOGh%po)z` Kgq!ZP7G47+p<_D$ diff --git a/src/main/java/dev/resent/module/impl/hud/KeyStrokes.java b/src/main/java/dev/resent/module/impl/hud/KeyStrokes.java index 00b3bbd8..1ab94318 100644 --- a/src/main/java/dev/resent/module/impl/hud/KeyStrokes.java +++ b/src/main/java/dev/resent/module/impl/hud/KeyStrokes.java @@ -10,7 +10,8 @@ import dev.resent.setting.ModeSetting; import dev.resent.util.misc.FuncUtils; import dev.resent.util.render.RainbowUtil; import dev.resent.util.render.RenderUtils; -GlStateManager.popMatrix(); +import net.lax1dude.eaglercraft.v1_8.Mouse; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -85,9 +86,9 @@ public class KeyStrokes extends RenderModule{ GlStateManager.pushMatrix(); - EaglerAdapter.glTranslatef(this.x + 1, this.y + 1, 0); - EaglerAdapter.glScalef(getSize(this.size), getSize(this.size), getSize(this.size)); - EaglerAdapter.glTranslatef(-(this.x + 1), -(this.y + 1), 0); + GlStateManager.translate(this.x + 1, this.y + 1, 0); + GlStateManager.scale(getSize(this.size), getSize(this.size), getSize(this.size)); + GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0); //W Gui.drawRect(this.x + 30, this.y + 3, this.x + 55, this.y + 25 + 3, @@ -128,26 +129,26 @@ public class KeyStrokes extends RenderModule{ mc.fontRendererObj.drawString("\u00A7m-------", this.x+85+(25/2-mc.fontRendererObj.getStringWidth("u00A7m-------") + 4), this.y+92-3, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindJump.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue()); if(sneak.getValue()) mc.fontRendererObj.drawString("Sneak", this.x+38+3+(25/2-mc.fontRendererObj.getStringWidth("Sneak") + 4), jump.getValue() ? this.y+92+15+1-3 : this.y+92-4, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindSneak.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue()); - mc.fontRendererObj.drawString("LMB", this.x+3+40/2-mc.fontRendererObj.getStringWidth("LMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : EaglerAdapter.mouseIsButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); - mc.fontRendererObj.drawString("RMB", this.x+40+3+40/2-mc.fontRendererObj.getStringWidth("RMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : EaglerAdapter.mouseIsButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); + mc.fontRendererObj.drawString("LMB", this.x+3+40/2-mc.fontRendererObj.getStringWidth("LMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); + mc.fontRendererObj.drawString("RMB", this.x+40+3+40/2-mc.fontRendererObj.getStringWidth("RMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); - EaglerAdapter.glTranslatef(this.x + 1, this.y + 1, 0); - EaglerAdapter.glScalef(getSize(this.size), getSize(this.size), getSize(this.size)); - EaglerAdapter.glTranslatef(-(this.x + 1), -(this.y + 1), 0); - EaglerAdapter.glTranslatef(this.x+41, this.y+82, 0); - EaglerAdapter.glScalef(0.5f, 0.5f, 0); - EaglerAdapter.glTranslatef(-(this.x+41), -(this.y+82), 0); + GlStateManager.translate(this.x + 1, this.y + 1, 0); + GlStateManager.scale(getSize(this.size), getSize(this.size), getSize(this.size)); + GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0); + GlStateManager.translate(this.x+41, this.y+82, 0); + GlStateManager.scale(0.5f, 0.5f, 0); + GlStateManager.translate(-(this.x+41), -(this.y+82), 0); if(lmbcps.getValue()) - mc.fontRendererObj.drawString(getLeftCPS() + " CPS", this.x-10, this.y+72, EaglerAdapter.mouseIsButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); + mc.fontRendererObj.drawString(getLeftCPS() + " CPS", this.x-10, this.y+72, Mouse.isButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); if(rmbcps.getValue()) - mc.fontRendererObj.drawString(getRightCPS() + " CPS", this.x+70, this.y+72, EaglerAdapter.mouseIsButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); + mc.fontRendererObj.drawString(getRightCPS() + " CPS", this.x+70, this.y+72, Mouse.isButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue()); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); - EaglerAdapter.glTranslatef(this.x + 1, this.y + 1, 0); - EaglerAdapter.glTranslatef(-(this.x + 1), -(this.y + 1), 0); + GlStateManager.translate(this.x + 1, this.y + 1, 0); + GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0); this.setHeight((25 + 5 + 25 + 5 + 25 + 25)); this.setWidth((25 + 5 + 25 + 5 + 30));