Port serverinfo

This commit is contained in:
ThisIsALegitUsername 2023-02-02 16:29:02 +00:00
parent b1739d7d88
commit 1ebf273e39
3 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,7 @@ import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@RenderModule(name = "ArmorHud", category = Category.HUD, x = 15, y = 4, hasSetting = true) @RenderModule(name = "ArmorHud", category = Category.HUD, x = 20, y = 4, hasSetting = true)
public class ArmorHud extends RenderMod { public class ArmorHud extends RenderMod {
public ScaledResolution sr; public ScaledResolution sr;

View File

@ -15,10 +15,6 @@ public class ReachDisplay extends RenderMod {
public static final DecimalFormat df2 = new DecimalFormat("0.00"); public static final DecimalFormat df2 = new DecimalFormat("0.00");
public double range; public double range;
public ReachDisplay() {
super("ReachDisplay", Category.HUD, 4, 34);
}
public int getWidth() { public int getWidth() {
return mc.fontRendererObj.getStringWidth("[" + df2.format(range) + " Blocks]") + 4; return mc.fontRendererObj.getStringWidth("[" + df2.format(range) + " Blocks]") + 4;
} }

View File

@ -1,15 +1,13 @@
package dev.resent.module.impl.hud; package dev.resent.module.impl.hud;
import dev.resent.annotation.RenderModule;
import dev.resent.module.Theme; import dev.resent.module.Theme;
import dev.resent.module.base.Category; import dev.resent.module.base.Category;
import dev.resent.module.base.RenderMod; import dev.resent.module.base.RenderMod;
@RenderModule(name = "Server info", category = Category.HUD, x = 4, y = 110)
public class ServerInfo extends RenderMod { public class ServerInfo extends RenderMod {
public ServerInfo() {
super("Server info", Category.HUD, 4, 44, true);
}
public int getWidth() { public int getWidth() {
return mc.fontRendererObj.getStringWidth(getText()) + 4; return mc.fontRendererObj.getStringWidth(getText()) + 4;
} }