Many mini-bug fixes and patches
This commit is contained in:
parent
9b31307a91
commit
b490bc13b6
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,6 @@ package dev.resent.module.impl.hud;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import dev.resent.module.Theme;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.RenderModule;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
|
@ -13,7 +12,7 @@ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
|||
public class CPS extends RenderModule {
|
||||
|
||||
public CPS() {
|
||||
super("CPS", Category.HUD, 50, 4, true);
|
||||
super("CPS", Category.HUD, 4, 84, true);
|
||||
addSetting(tshadow);
|
||||
}
|
||||
|
||||
|
@ -22,17 +21,23 @@ public class CPS extends RenderModule {
|
|||
private long lastPressed;
|
||||
|
||||
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
|
||||
public int getWidth() { return mc.fontRendererObj.getStringWidth("[CPS: 00]") + 4; }
|
||||
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT+4; }
|
||||
|
||||
public int getWidth() {
|
||||
return mc.fontRendererObj.getStringWidth("[00 CPS]") + 4;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return mc.fontRendererObj.FONT_HEIGHT + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw() {
|
||||
final boolean pressed = Mouse.isButtonDown(0) || Mouse.isButtonDown(1);
|
||||
|
||||
if(pressed != wasPressed){
|
||||
if (pressed != wasPressed) {
|
||||
lastPressed = System.currentTimeMillis();
|
||||
wasPressed = pressed;
|
||||
if(pressed){
|
||||
if (pressed) {
|
||||
this.clicks.add(lastPressed);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +45,6 @@ public class CPS extends RenderModule {
|
|||
final long time = System.currentTimeMillis();
|
||||
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
|
||||
|
||||
mc.fontRendererObj.drawString("[CPS: " + clicks.size() + "]", this.x+2, this.y+2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString("[" + clicks.size() + " CPS]", this.x + 2, this.y + 2, -1, tshadow.getValue());
|
||||
}
|
||||
|
||||
}
|
|
@ -47,8 +47,6 @@ public class KeyStrokes extends RenderModule {
|
|||
boolean sKey = Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode());
|
||||
boolean dKey = Keyboard.isKeyDown(mc.gameSettings.keyBindRight.getKeyCode());
|
||||
boolean spaceKey = Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode());
|
||||
boolean pressed = Keyboard.isKeyDown(mc.gameSettings.keyBindAttack.getKeyCode());
|
||||
boolean rpressed = Keyboard.isKeyDown(mc.gameSettings.keyBindUseItem.getKeyCode());
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
|
@ -67,9 +65,9 @@ public class KeyStrokes extends RenderModule {
|
|||
// D
|
||||
Gui.drawRect(this.x + 60 - 3, this.y + 30, this.x + 85 - 3, this.y + 25 + 5 + 25, dKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
// LMB
|
||||
Gui.drawRect(this.x + 3, this.y + 57, this.x + 41, this.y + 82, pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
Gui.drawRect(this.x + 3, this.y + 57, this.x + 41, this.y + 82, mc.gameSettings.keyBindAttack.isPressed() ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
// RMB
|
||||
Gui.drawRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3, rpressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
Gui.drawRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3, mc.gameSettings.keyBindUseItem.isPressed() ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
|
||||
// Jump
|
||||
if (jump.getValue()) Gui.drawRect(this.x + 3, this.y + 84, this.x + 85 - 3, this.y + 105 - 6, spaceKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package dev.resent.module.impl.movement;
|
||||
|
||||
import dev.resent.module.Theme;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.RenderModule;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
|
@ -66,7 +67,7 @@ public class Sprint extends RenderModule {
|
|||
@Override
|
||||
public void draw() {
|
||||
this.fr = mc.fontRendererObj;
|
||||
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, -1);
|
||||
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user