Fix combocounter and prepare to update
This commit is contained in:
parent
9547634097
commit
afd294ccbe
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
11939
javascript/classes.js
11939
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -10,15 +10,15 @@ import net.minecraft.network.play.server.S19PacketEntityStatus;
|
|||
|
||||
public class ComboCounter extends RenderModule {
|
||||
|
||||
public static boolean attacked = false;
|
||||
public static int combo = 0;
|
||||
public static BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
|
||||
|
||||
public ComboCounter() {
|
||||
super("ComboCounter", Category.HUD, 4, 24, true);
|
||||
addSetting(tshadow);
|
||||
}
|
||||
|
||||
public static boolean attacked = false;
|
||||
public static int combo = 0;
|
||||
public static BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
|
||||
|
||||
public void onAttack(Entity e) {
|
||||
if (this.isEnabled()) {
|
||||
attacked = true;
|
||||
|
@ -32,13 +32,8 @@ public class ComboCounter extends RenderModule {
|
|||
}
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4;
|
||||
}
|
||||
public int getWidth() { return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4; }
|
||||
public int getHeight() { return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4; }
|
||||
|
||||
private String getText(){
|
||||
return "["+combo+" Combo]";
|
||||
|
@ -46,6 +41,9 @@ public class ComboCounter extends RenderModule {
|
|||
|
||||
@Override
|
||||
public void draw() {
|
||||
if(Minecraft.getMinecraft().thePlayer.hurtTime > 3 && this.enabled){
|
||||
combo = 0;
|
||||
}
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("["+combo+" Combo]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user