Change default positioning; fix ComboCounter

This commit is contained in:
ThisIsALegitUsername 2023-01-13 23:18:13 +00:00
parent 235509df1e
commit 9e14f8f4e5
14 changed files with 759518 additions and 31942 deletions

View File

@ -40,7 +40,7 @@ dependencies {
teavm { teavm {
compileScopes = null; compileScopes = null;
minifying = true; minifying = false;
maxTopLevelNames = 10000; maxTopLevelNames = 10000;
properties = null; properties = null;
debugInformationGenerated = false; debugInformationGenerated = false;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ public class ArmorHud extends RenderModule {
public ScaledResolution sr; public ScaledResolution sr;
public ArmorHud() { public ArmorHud() {
super("ArmorHud", Category.HUD, 50, 4, true); super("ArmorHud", Category.HUD, 4, 4, true);
addSetting(helm, chestp, leg, boot, item); addSetting(helm, chestp, leg, boot, item);
} }

View File

@ -12,7 +12,7 @@ import java.util.List;
public class CPS extends RenderModule { public class CPS extends RenderModule {
public CPS() { public CPS() {
super("CPS", Category.HUD, 50, 4, true); super("CPS", Category.HUD, 4, 84, true);
addSetting(tshadow); addSetting(tshadow);
} }
@ -21,7 +21,7 @@ public class CPS extends RenderModule {
private long lastPressed; private long lastPressed;
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true); public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
public int getWidth() { return mc.fontRendererObj.getStringWidth("[CPS: 00]") + 4; } public int getWidth() { return mc.fontRendererObj.getStringWidth("[00 CPS]") + 4; }
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT+4; } public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT+4; }
@Override @Override
@ -39,7 +39,7 @@ public class CPS extends RenderModule {
final long time = System.currentTimeMillis(); final long time = System.currentTimeMillis();
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time); FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
mc.fontRendererObj.drawString("CPS: " + clicks.size(), this.x+2, this.y+2, -1, tshadow.getValue()); mc.fontRendererObj.drawString("["+clicks.size()+"CPS]", this.x+2, this.y+2, -1, tshadow.getValue());
} }
} }

View File

@ -6,15 +6,16 @@ import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule; import dev.resent.module.base.RenderModule;
import dev.resent.setting.BooleanSetting; import dev.resent.setting.BooleanSetting;
import net.minecraft.network.play.server.S19PacketEntityStatus; import net.minecraft.network.play.server.S19PacketEntityStatus;
import net.minecraft.client.Minecraft;
public class ComboCounter extends RenderModule { public class ComboCounter extends RenderModule {
public static boolean attacked = false; public static boolean attacked = false;
public static int combo = 0; public static int combo = 0;
public BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", true); public static BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", true);
public ComboCounter() { public ComboCounter() {
super("ComboCounter", Category.HUD, 4, 4, true); super("ComboCounter", Category.HUD, 4, 14, true);
addSetting(tshadow); addSetting(tshadow);
} }
@ -41,7 +42,7 @@ public class ComboCounter extends RenderModule {
@Override @Override
public void draw() { public void draw() {
mc.fontRendererObj.drawString(combo + " Combo", this.x + 2, this.y + 2, -1, tshadow.getValue()); Minecraft.getMinecraft().fontRendererObj.drawString("[" + combo + " Combo]", this.x + 2, this.y + 2, -1, tshadow.getValue());
} }
} }

View File

@ -10,7 +10,7 @@ public class FPS extends RenderModule{
public Minecraft mc = Minecraft.getMinecraft(); public Minecraft mc = Minecraft.getMinecraft();
public FPS(){ public FPS(){
super("FPS", Category.HUD, 4, 24, true); super("FPS", Category.HUD, 4, 14, true);
addSetting(tshadow); addSetting(tshadow);
} }

View File

@ -7,7 +7,7 @@ import dev.resent.setting.BooleanSetting;
public class Health extends RenderModule { public class Health extends RenderModule {
public Health(){ public Health(){
super("Health Display", Category.HUD, 4, 34, true); super("Health Display", Category.HUD, 4, 64, true);
addSetting(tshadow); addSetting(tshadow);
} }

View File

@ -10,7 +10,7 @@ import net.minecraft.util.BlockPos;
public class Info extends RenderModule{ public class Info extends RenderModule{
public Info(){ public Info(){
super("Info", Category.HUD, 4, 14); super("Info", Category.HUD, 70, 4);
//addSetting(direction); //addSetting(direction);
} }

View File

@ -6,7 +6,7 @@ import dev.resent.setting.BooleanSetting;
public class Ping extends RenderModule{ public class Ping extends RenderModule{
public Ping(){ public Ping(){
super("Ping Display", Category.HUD, 4, 74, true); super("Ping Display", Category.HUD, 4, 54, true);
addSetting(tshadow); addSetting(tshadow);
} }

View File

@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
public class PotCounter extends RenderModule{ public class PotCounter extends RenderModule{
public PotCounter(){ public PotCounter(){
super("PotCounter", Category.HUD, 4, 64, true); super("PotCounter", Category.HUD, 4, 74, true);
addSetting(tshadow); addSetting(tshadow);
} }

View File

@ -6,7 +6,7 @@ import dev.resent.setting.BooleanSetting;
public class ServerInfo extends RenderModule{ public class ServerInfo extends RenderModule{
public ServerInfo(){ public ServerInfo(){
super("Server info", Category.HUD, 4, 84, true); super("Server info", Category.HUD, 4, 44, true);
addSetting(tshadow); addSetting(tshadow);
} }

View File

@ -12,7 +12,7 @@ public class Watermark extends RenderModule{
public FontRenderer fr; public FontRenderer fr;
public Watermark() { public Watermark() {
super("Watermark", Category.HUD, 300, 4); super("Watermark", Category.HUD, 100, 4);
} }
@Override @Override

View File

@ -13,7 +13,7 @@ public class Sprint extends RenderModule {
public FontRenderer fr; public FontRenderer fr;
public Sprint(){ public Sprint(){
super("ToggleSprint", Category.MOVEMENT, 4, 10, true); super("ToggleSprint", Category.MOVEMENT, 4, 94, true);
addSetting(drawn); addSetting(drawn);
} }
@ -68,17 +68,11 @@ public class Sprint extends RenderModule {
public void draw() { public void draw() {
this.fr = mc.fontRendererObj; this.fr = mc.fontRendererObj;
if(drawn.getValue()) if(drawn.getValue())
fr.drawStringWithShadow(getText(), getX() + getWidth() / 2 - ((getWidth() - 10) / 2), getY() + (getHeight() / 2 - fr.FONT_HEIGHT / 2), -1); fr.drawStringWithShadow(getText(), x + 2, y + 2, -1);
}
@Override
public void renderLayout(int mouseX, int mouseY) {
super.renderLayout(mouseX, mouseY);
fr.drawStringWithShadow("[Sprinting [Toggled)]", getX() + getWidth() / 2 - ((getWidth() - 10) / 2), getY() + (getHeight() / 2 - fr.FONT_HEIGHT / 2), -1);
} }
@Override @Override
public int getHeight() { public int getHeight() {
return fr.FONT_HEIGHT + 3; return fr.FONT_HEIGHT + 2;
} }
} }