Skip to content

Commit

Permalink
Fix HUD icons being tinted
Browse files Browse the repository at this point in the history
  • Loading branch information
bowser0000 committed May 5, 2024
1 parent b13ceee commit ceed033
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/me/Danker/features/BonzoMaskTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
Expand Down Expand Up @@ -74,6 +75,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if (example) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(BONZO_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand All @@ -89,6 +91,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Bonzo's Mask")) || nextBonzoUse > 0) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(BONZO_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/me/Danker/features/CakeTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import me.Danker.utils.RenderUtils;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
Expand Down Expand Up @@ -67,6 +68,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
Minecraft mc = Minecraft.getMinecraft();
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(CAKE_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand All @@ -80,6 +82,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
Minecraft mc = Minecraft.getMinecraft();
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(CAKE_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/me/Danker/features/GolemSpawningAlert.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import me.Danker.utils.RenderUtils;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
Expand Down Expand Up @@ -54,6 +55,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if (example) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(GOLEM_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand All @@ -67,6 +69,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if (enabled && Utils.inSkyblock && golemTime > System.currentTimeMillis() / 1000) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(GOLEM_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/me/Danker/features/SpiritMaskTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
Expand Down Expand Up @@ -73,6 +74,7 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if (example) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(SPIRIT_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);
Expand All @@ -88,7 +90,8 @@ protected void draw(UMatrixStack matrices, float x, float y, float scale, boolea
if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Spirit Mask")) || nextspiritUse > 0) {
double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);

GlStateManager.color(1, 1, 1, 1);

mc.getTextureManager().bindTexture(SPIRIT_ICON);
RenderUtils.drawModalRectWithCustomSizedTexture(x / scale, y / scale, 0, 0, 16, 16, 16, 16);

Expand Down

0 comments on commit ceed033

Please sign in to comment.