diff --git a/src/main/java/dev/resent/module/impl/misc/Crosshair.java b/src/main/java/dev/resent/module/impl/misc/Crosshair.java index efdc3448..c62690bd 100644 --- a/src/main/java/dev/resent/module/impl/misc/Crosshair.java +++ b/src/main/java/dev/resent/module/impl/misc/Crosshair.java @@ -1,15 +1,14 @@ package dev.resent.module.impl.misc; +import dev.resent.annotation.Module; import dev.resent.module.base.Category; import dev.resent.module.base.Mod; import dev.resent.module.setting.ModeSetting; +@Module(name = "Crosshair", category = Category.MISC, hasSetting = true) public class Crosshair extends Mod { - public Crosshair() { - super("Crosshair", Category.MISC, true); - addSetting(color); - } + public Crosshair() { addSetting(color); } public static ModeSetting color = new ModeSetting("Hovered crosshair color", "", "White", "Red", "Yellow", "Green", "Blue", "Black"); } diff --git a/src/main/java/net/minecraft/client/gui/GuiIngame.java b/src/main/java/net/minecraft/client/gui/GuiIngame.java index af35d6e0..55158291 100644 --- a/src/main/java/net/minecraft/client/gui/GuiIngame.java +++ b/src/main/java/net/minecraft/client/gui/GuiIngame.java @@ -325,9 +325,10 @@ public class GuiIngame extends Gui { GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0); GlStateManager.enableAlpha(); - if (Minecraft.getMinecraft().pointedEntity != null && ModManager.crosshair.isEnabled()){ + if (ModManager.crosshair.isEnabled()){ + GlStateManager.disableAlpha(); + if(Minecraft.getMinecraft().pointedEntity != null) GlStateManager.color(RenderUtils.getColorWithoutRGB(Crosshair.color).getRed(), RenderUtils.getColorWithoutRGB(Crosshair.color).getGreen(), RenderUtils.getColorWithoutRGB(Crosshair.color).getBlue()); - GlStateManager.disableAlpha(); } this.drawTexturedModalRect(scaledResWidth / 2 - 7, scaledResHeight / 2 - 7, 0, 0, 16, 16);