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 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() {
|
public ComboCounter() {
|
||||||
super("ComboCounter", Category.HUD, 4, 24, true);
|
super("ComboCounter", Category.HUD, 4, 24, true);
|
||||||
addSetting(tshadow);
|
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) {
|
public void onAttack(Entity e) {
|
||||||
if (this.isEnabled()) {
|
if (this.isEnabled()) {
|
||||||
attacked = true;
|
attacked = true;
|
||||||
|
@ -32,13 +32,8 @@ public class ComboCounter extends RenderModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() { return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4; }
|
||||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4;
|
public int getHeight() { return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4; }
|
||||||
}
|
|
||||||
|
|
||||||
public int getHeight() {
|
|
||||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getText(){
|
private String getText(){
|
||||||
return "["+combo+" Combo]";
|
return "["+combo+" Combo]";
|
||||||
|
@ -46,6 +41,9 @@ public class ComboCounter extends RenderModule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
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());
|
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