Port crosshair
This commit is contained in:
parent
58b579a1eb
commit
a143a161ab
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user