Potionhud fixes

This commit is contained in:
ThisIsALegitUsername 2023-01-10 22:00:07 +00:00
parent 4297fe12d4
commit d517afd16c
10 changed files with 7 additions and 42 deletions

View File

@ -1,39 +0,0 @@
package dev.resent.module.impl.hud;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
import dev.resent.util.render.RainbowUtil;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
public class FakeArray extends RenderModule{
public List<String> fakemods = new ArrayList<>();
public FakeArray(){
super("Fake Hacks", Category.HUD, 800, 4);
fakemods.add("AutoClicker");
fakemods.add("AimAssist");
fakemods.add("Reach");
fakemods.add("Velocity");
}
public int getWidth(){ return mc.fontRendererObj.getStringWidth("Autoclicker "); }
public int getHeight(){ return 50; }
public void draw(){
fakemods.sort(Comparator.comparingInt(m -> mc.fontRendererObj.getStringWidth((String) m)).reversed());
int count = 0;
for (int i = 0; i < fakemods.size(); i++) {
GlStateManager.pushMatrix();
mc.fontRendererObj.drawStringWithShadow(fakemods.get(i), x + 2, count * mc.fontRendererObj.FONT_HEIGHT + (y) + 4, RainbowUtil.getRainbow1(50));
GlStateManager.popMatrix();
count++;
}
}
}

View File

@ -47,11 +47,15 @@ public class PotionHUD extends RenderModule{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
if (potion.hasStatusIcon()) {
GuiIngame guiIngame = new GuiIngame(mc);
GlStateManager.enableAlpha();
//GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(775, 769, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/inventory.png"));
int i3 = potion.getStatusIconIndex();
guiIngame.drawTexturedModalRect(getX() + 21 - 20, getY() + i2 - 20, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
guiIngame.drawTexturedModalRect(getX() + 21 - 14, getY() + i2 - 14, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
}
String s1 = I18n.format(potion.getName(), new Object[0]);
if (potioneffect.getAmplifier() == 1) {
@ -68,9 +72,9 @@ public class PotionHUD extends RenderModule{
s1 = ("" + potioneffect.getAmplifier());
}
mc.fontRendererObj.drawString(s1, (getX() + 21), (getY() + i2 - 20), 16777215, true);
mc.fontRendererObj.drawString(s1, (getX() + 21), (getY() + i2 - 14), 16777215, true);
String s2 = Potion.getDurationString(potioneffect);
mc.fontRendererObj.drawString(s2, (getX() + 21), (getY() + i2 + 10 - 20), 8355711, true);
mc.fontRendererObj.drawString(s2, (getX() + 21), (getY() + i2 + 10 - 14), 8355711, true);
i2 += l;
}
}