Fix combocounter and prepare to update

This commit is contained in:
UnknownUser1789 2023-01-23 23:36:11 +00:00
parent 9547634097
commit afd294ccbe
5 changed files with 17918 additions and 17923 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -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());
}
}