diff --git a/bin/main/dev/resent/module/impl/hud/PotionHUD.class b/bin/main/dev/resent/module/impl/hud/PotionHUD.class index c720c3df..08116c06 100644 Binary files a/bin/main/dev/resent/module/impl/hud/PotionHUD.class and b/bin/main/dev/resent/module/impl/hud/PotionHUD.class differ diff --git a/bin/main/dev/resent/module/impl/hud/ReachDisplay.class b/bin/main/dev/resent/module/impl/hud/ReachDisplay.class index 239d5de5..76b57e3b 100644 Binary files a/bin/main/dev/resent/module/impl/hud/ReachDisplay.class and b/bin/main/dev/resent/module/impl/hud/ReachDisplay.class differ diff --git a/src/main/java/dev/resent/module/impl/hud/PotionHUD.java b/src/main/java/dev/resent/module/impl/hud/PotionHUD.java index 207d6f1a..09784b54 100644 --- a/src/main/java/dev/resent/module/impl/hud/PotionHUD.java +++ b/src/main/java/dev/resent/module/impl/hud/PotionHUD.java @@ -4,16 +4,12 @@ import java.util.Collection; import dev.resent.module.base.Category; import dev.resent.module.base.RenderModule; -import net.lax1dude.eaglercraft.TextureLocation; -import net.lax1dude.eaglercraft.adapter.Tessellator; import net.minecraft.client.Minecraft; -import net.minecraft.src.FontRenderer; -import net.minecraft.client.gui.Gui; -import net.minecraft.src.GuiScreen; -import net.minecraft.src.Potion; -import net.minecraft.src.PotionEffect; -import net.minecraft.src.ScaledResolution; -import net.minecraft.src.StatCollector; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.StatCollector; @SuppressWarnings("all") public class PotionHUD extends RenderModule{ @@ -45,8 +41,8 @@ public class PotionHUD extends RenderModule{ @Override public void draw(){ this.setHeight(20); - this.setWidth(Minecraft.getMinecraft().fontRenderer.getStringWidth("Resistance VII") + 2); - sr = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight); + this.setWidth(mc.fontRendererObj.getStringWidth("Resistance VII") + 2); + sr = new ScaledResolution(mc); Collection effects = mc.thePlayer.getActivePotionEffects(); int potcount = 0; @@ -77,7 +73,7 @@ public class PotionHUD extends RenderModule{ guiScreen.drawTexturedModalRect(this.x, this.y+ 4, 0 + var9 % 8 * 18, 198 + var9 / 8 * 18, 18, 18); }*/ - fr = Minecraft.getMinecraft().fontRenderer; + fr = mc.fontRendererObj; String toDraw = "§4" + eName + "§r §a" + ampString + " §9" + duration; fr.drawStringWithShadow(toDraw, this.x + 2, this.y + (potcount * 10) -5, -1); this.setHeight((potcount * 10) + 10); diff --git a/src/main/java/dev/resent/module/impl/hud/ReachDisplay.java b/src/main/java/dev/resent/module/impl/hud/ReachDisplay.java index a8a1bff6..7ffa9920 100644 --- a/src/main/java/dev/resent/module/impl/hud/ReachDisplay.java +++ b/src/main/java/dev/resent/module/impl/hud/ReachDisplay.java @@ -6,7 +6,7 @@ import dev.resent.Resent; import dev.resent.event.impl.EventAttack; import dev.resent.module.base.Category; import dev.resent.module.base.RenderModule; -import net.minecraft.src.Vec3; +import net.minecraft.util.Vec3; public class ReachDisplay extends RenderModule { @@ -17,14 +17,8 @@ public class ReachDisplay extends RenderModule { Resent.INSTANCE.events().subscribe(EventAttack.class, event -> { if (this.isEnabled()) { - Vec3 vec3 = this.mc.renderViewEntity.getPosition(1.0f); - range = range <= 3.0f - ? ((range >= 0.8) ? this.mc.objectMouseOver.hitVec.distanceTo(vec3) - 0.8 - : mc.objectMouseOver.hitVec.distanceTo(vec3)) - : 3.0; - if (mc.playerController.isInCreativeMode() && this.mc.objectMouseOver.hitVec.distanceTo(vec3) >= 6.0f) { - range = 6.0f; - } + Vec3 vec3 = this.mc.getRenderViewEntity().getPositionEyes(1.0f); + range = this.mc.objectMouseOver.hitVec.distanceTo(vec3); if (range > 3.0f && !mc.playerController.isInCreativeMode()) { range = 3.0f; }