aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-04 05:36:16 +1100
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-04 05:36:16 +1100
commitf89c363dda53046d832089d94f04695ce60d3ae6 (patch)
treefdbff20257b9fc4ff2f6ea82011f1fc6f95c0244 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent36af336e49662390c0f553da6f7f5ec424e5d37b (diff)
downloadnotenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.tar.gz
notenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.tar.bz2
notenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.zip
fine 1.5.3
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index f732779c..e2faa5aa 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -31,6 +31,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
+import net.minecraft.potion.Potion;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.*;
import net.minecraftforge.fml.common.Loader;
@@ -57,6 +58,7 @@ import java.util.regex.Pattern;
public class Utils {
private static boolean hasEffectOverride = false;
+ public static boolean disableCustomDungColours = false;
private static LinkedList<Integer> guiScales = new LinkedList<>();
private static ScaledResolution lastScale = new ScaledResolution(Minecraft.getMinecraft());
//Labymod compatibility
@@ -144,6 +146,7 @@ public class Utils {
public static void drawItemStackWithoutGlint(ItemStack stack, int x, int y) {
RenderItem itemRender = Minecraft.getMinecraft().getRenderItem();
+ disableCustomDungColours = true;
RenderHelper.enableGUIStandardItemLighting();
itemRender.zLevel = -145; //Negates the z-offset of the below method.
hasEffectOverride = true;
@@ -153,6 +156,7 @@ public class Utils {
hasEffectOverride = false;
itemRender.zLevel = 0;
RenderHelper.disableStandardItemLighting();
+ disableCustomDungColours = false;
}
public static void drawItemStackWithText(ItemStack stack, int x, int y, String text) {
@@ -160,12 +164,14 @@ public class Utils {
RenderItem itemRender = Minecraft.getMinecraft().getRenderItem();
+ disableCustomDungColours = true;
RenderHelper.enableGUIStandardItemLighting();
itemRender.zLevel = -145; //Negates the z-offset of the below method.
itemRender.renderItemAndEffectIntoGUI(stack, x, y);
itemRender.renderItemOverlayIntoGUI(Minecraft.getMinecraft().fontRendererObj, stack, x, y, text);
itemRender.zLevel = 0;
RenderHelper.disableStandardItemLighting();
+ disableCustomDungColours = false;
}
public static void drawItemStack(ItemStack stack, int x, int y) {