From 233cd3eb7392cb3ed2a7b31c36967e8a187bc024 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 16 Aug 2021 21:49:23 +0200 Subject: Crafting overlay --- .../notenoughupdates/NEUEventListener.java | 10 ++- .../moulberry/notenoughupdates/NEUManager.java | 33 +++++---- .../notenoughupdates/overlays/CraftingOverlay.java | 86 ++++++++++++++++++++++ 3 files changed, 112 insertions(+), 17 deletions(-) create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 6ebcc04f..d661c290 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -19,10 +19,7 @@ import io.github.moulberry.notenoughupdates.gamemodes.SBGamemodes; import io.github.moulberry.notenoughupdates.miscfeatures.*; import io.github.moulberry.notenoughupdates.miscgui.*; import io.github.moulberry.notenoughupdates.options.NEUConfig; -import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay; -import io.github.moulberry.notenoughupdates.overlays.OverlayManager; -import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay; -import io.github.moulberry.notenoughupdates.overlays.TextOverlay; +import io.github.moulberry.notenoughupdates.overlays.*; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.util.*; import net.minecraft.client.Minecraft; @@ -570,6 +567,8 @@ public class NEUEventListener { AtomicBoolean missingRecipe = new AtomicBoolean(false); @SubscribeEvent public void onGuiOpen(GuiOpenEvent event) { + CraftingOverlay.shouldRender = false; + if((Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper || Minecraft.getMinecraft().currentScreen instanceof GuiItemRecipe) && event.gui == null && !(Keyboard.getEventKeyState() && Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) && @@ -1060,6 +1059,9 @@ public class NEUEventListener { GuiChest eventGui = (GuiChest) guiScreen; ContainerChest cc = (ContainerChest) eventGui.inventorySlots; containerName = cc.getLowerChestInventory().getDisplayName().getUnformattedText(); + if (containerName.equals("Craft Item")) { + CraftingOverlay.render(); + } } if(GuiCustomEnchant.getInstance().shouldOverride(containerName)) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 967ef903..74c8b2d3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -4,6 +4,7 @@ import com.google.common.collect.Lists; import com.google.gson.*; import io.github.moulberry.notenoughupdates.auction.APIManager; import io.github.moulberry.notenoughupdates.miscgui.GuiItemRecipe; +import io.github.moulberry.notenoughupdates.overlays.CraftingOverlay; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.HypixelApi; import io.github.moulberry.notenoughupdates.util.SBInfo; @@ -12,6 +13,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.inventory.ContainerChest; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.*; @@ -35,10 +37,10 @@ import java.util.zip.ZipInputStream; public class NEUManager { private final NotEnoughUpdates neu; - public final Gson gson; + public static Gson gson; public final APIManager auctionManager; - private TreeMap itemMap = new TreeMap<>(); + private static TreeMap itemMap = new TreeMap<>(); private TreeMap>> titleWordMap = new TreeMap<>(); private TreeMap>> loreWordMap = new TreeMap<>(); @@ -60,7 +62,7 @@ public class NEUManager { private String currentProfileBackup = ""; public final HypixelApi hypixelApi = new HypixelApi(); - private Map itemstackCache = new HashMap<>(); + private static Map itemstackCache = new HashMap<>(); private ExecutorService repoLoaderES = Executors.newSingleThreadExecutor(); @@ -797,7 +799,12 @@ public class NEUManager { } public void showRecipe(JsonObject item) { - if(item.has("useneucraft") && item.get("useneucraft").getAsBoolean()) { + if (item.has("recipe") && Minecraft.getMinecraft().thePlayer.openContainer instanceof ContainerChest) { + ContainerChest container = (ContainerChest) Minecraft.getMinecraft().thePlayer.openContainer; + if (container.getLowerChestInventory().getDisplayName().getUnformattedText().equals("Craft Item")) { + CraftingOverlay.updateItem(item); + } + } else if(item.has("useneucraft") && item.get("useneucraft").getAsBoolean()) { displayGuiItemRecipe(item.get("internalname").getAsString(), ""); } else if(item.has("clickcommand")) { String clickcommand = item.get("clickcommand").getAsString(); @@ -1181,11 +1188,11 @@ public class NEUManager { writeJson(json, file); } - public TreeMap getItemInformation() { + public static TreeMap getItemInformation() { return itemMap; } - public String removeUnusedDecimal(double num) { + public static String removeUnusedDecimal(double num) { if(num % 1 == 0) { return String.valueOf((int)num); } else { @@ -1193,7 +1200,7 @@ public class NEUManager { } } - public HashMap getLoreReplacements(String petname, String tier, int level) { + public static HashMap getLoreReplacements(String petname, String tier, int level) { JsonObject petnums = null; if(petname != null && tier != null) { petnums = Constants.PETNUMS; @@ -1257,7 +1264,7 @@ public class NEUManager { return replacements; } - public HashMap getLoreReplacements(NBTTagCompound tag, int level) { + public static HashMap getLoreReplacements(NBTTagCompound tag, int level) { String petname = null; String tier = null; if(tag != null && tag.hasKey("ExtraAttributes")) { @@ -1289,7 +1296,7 @@ public class NEUManager { return getLoreReplacements(petname, tier, level); } - public NBTTagList processLore(JsonArray lore, HashMap replacements) { + public static NBTTagList processLore(JsonArray lore, HashMap replacements) { NBTTagList nbtLore = new NBTTagList(); for(JsonElement line : lore) { String lineStr = line.getAsString(); @@ -1304,19 +1311,19 @@ public class NEUManager { return nbtLore; } - public ItemStack jsonToStack(JsonObject json) { + public static ItemStack jsonToStack(JsonObject json) { return jsonToStack(json, true); } - public ItemStack jsonToStack(JsonObject json, boolean useCache) { + public static ItemStack jsonToStack(JsonObject json, boolean useCache) { return jsonToStack(json, useCache, true); } - public ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements) { + public static ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements) { return jsonToStack(json, useCache, useReplacements, true); } - public ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements, boolean copyStack) { + public static ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements, boolean copyStack) { if(json == null) return new ItemStack(Items.painting, 1, 10); String internalname = json.get("internalname").getAsString(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java new file mode 100644 index 00000000..50fa9848 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java @@ -0,0 +1,86 @@ +package io.github.moulberry.notenoughupdates.overlays; + +import com.google.gson.JsonObject; +import io.github.moulberry.notenoughupdates.NEUManager; +import io.github.moulberry.notenoughupdates.util.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import org.luaj.vm2.ast.Str; +import org.lwjgl.input.Mouse; + +import java.util.List; + +public class CraftingOverlay { + private static ItemStack[] items = new ItemStack[9]; + public static boolean shouldRender = false; + private static String text = null; + + public static void render() { + if (shouldRender) { + ContainerChest container = (ContainerChest) Minecraft.getMinecraft().thePlayer.openContainer; + GuiChest gc = (GuiChest) Minecraft.getMinecraft().currentScreen; + FontRenderer ft = Minecraft.getMinecraft().fontRendererObj; + int width = Utils.peekGuiScale().getScaledWidth(); + int height = Utils.peekGuiScale().getScaledHeight(); + int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; + int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; + List tooltip = null; + for (int i = 0; i < 9; i++) { + if (items[i] != null) { + int slotIndex = (int) (10 + 9 * Math.floor(i / 3f) + (i % 3)); + Slot slot = container.inventorySlots.get(slotIndex); + int x = slot.xDisplayPosition + gc.guiLeft; + int y = slot.yDisplayPosition + gc.guiTop; + if (!slot.getHasStack() || !slot.getStack().getDisplayName().equals(items[i].getDisplayName()) || + slot.getStack().stackSize < items[i].stackSize) + Gui.drawRect(x, y, + x + 16, y + 16, 0x64ff0000); + if (!slot.getHasStack()) + Utils.drawItemStack(items[i], x, y); + if (mouseX >= x && mouseX < x + 16 && mouseY >= y && mouseY < y + 16) + tooltip = items[i].getTooltip(Minecraft.getMinecraft().thePlayer, false); + } + } + if (text != null) + ft.drawStringWithShadow(text, + Utils.peekGuiScale().getScaledWidth() / 2f - ft.getStringWidth(text) / 2f, + gc.guiTop - 15f, 0x808080); + if (tooltip != null) + Utils.drawHoveringText(tooltip, mouseX, mouseY, width, height, -1, ft); + } + } + + public static void updateItem(JsonObject item) { + items = new ItemStack[9]; + String[] x = {"1", "2", "3"}; + String[] y = {"A", "B", "C"}; + for (int i = 0; i < 9; i++) { + String name = y[i / 3] + x[i % 3]; + String itemS = item.getAsJsonObject("recipe").get(name).getAsString(); + if (itemS != null && !itemS.equals("")) { + int count = 1; + if (itemS.split(":").length == 2) { + count = Integer.parseInt(itemS.split(":")[1]); + itemS = itemS.split(":")[0]; + } + JsonObject craft = NEUManager.getItemInformation().get(itemS); + if (craft != null) { + ItemStack stack = NEUManager.jsonToStack(craft); + stack.stackSize = count; + items[i] = stack; + } + } + } + if (item.has("crafttext")) { + text = item.get("crafttext").getAsString(); + } + shouldRender = true; + } +} -- cgit From 00d03d913dcfbc73e839bf61981ff9926c9f46ce Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 16 Aug 2021 22:38:54 +0200 Subject: now use internalname to check + code cleanup --- .../notenoughupdates/NEUEventListener.java | 10 ++++---- .../moulberry/notenoughupdates/NEUManager.java | 28 ++++++++++++---------- .../notenoughupdates/overlays/CraftingOverlay.java | 24 ++++++++++--------- 3 files changed, 34 insertions(+), 28 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index d661c290..610d6931 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -15,11 +15,13 @@ import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils; import io.github.moulberry.notenoughupdates.cosmetics.CapeManager; import io.github.moulberry.notenoughupdates.dungeons.DungeonBlocks; import io.github.moulberry.notenoughupdates.dungeons.DungeonWin; -import io.github.moulberry.notenoughupdates.gamemodes.SBGamemodes; import io.github.moulberry.notenoughupdates.miscfeatures.*; import io.github.moulberry.notenoughupdates.miscgui.*; import io.github.moulberry.notenoughupdates.options.NEUConfig; -import io.github.moulberry.notenoughupdates.overlays.*; +import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay; +import io.github.moulberry.notenoughupdates.overlays.OverlayManager; +import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay; +import io.github.moulberry.notenoughupdates.overlays.TextOverlay; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.util.*; import net.minecraft.client.Minecraft; @@ -567,7 +569,7 @@ public class NEUEventListener { AtomicBoolean missingRecipe = new AtomicBoolean(false); @SubscribeEvent public void onGuiOpen(GuiOpenEvent event) { - CraftingOverlay.shouldRender = false; + neu.manager.craftingOverlay.shouldRender = false; if((Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper || Minecraft.getMinecraft().currentScreen instanceof GuiItemRecipe) && @@ -1060,7 +1062,7 @@ public class NEUEventListener { ContainerChest cc = (ContainerChest) eventGui.inventorySlots; containerName = cc.getLowerChestInventory().getDisplayName().getUnformattedText(); if (containerName.equals("Craft Item")) { - CraftingOverlay.render(); + neu.manager.craftingOverlay.render(); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 74c8b2d3..aff030d8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -37,10 +37,10 @@ import java.util.zip.ZipInputStream; public class NEUManager { private final NotEnoughUpdates neu; - public static Gson gson; + public final Gson gson; public final APIManager auctionManager; - private static TreeMap itemMap = new TreeMap<>(); + private TreeMap itemMap = new TreeMap<>(); private TreeMap>> titleWordMap = new TreeMap<>(); private TreeMap>> loreWordMap = new TreeMap<>(); @@ -62,7 +62,7 @@ public class NEUManager { private String currentProfileBackup = ""; public final HypixelApi hypixelApi = new HypixelApi(); - private static Map itemstackCache = new HashMap<>(); + private Map itemstackCache = new HashMap<>(); private ExecutorService repoLoaderES = Executors.newSingleThreadExecutor(); @@ -76,6 +76,8 @@ public class NEUManager { public File repoLocation; public File configFile; + public CraftingOverlay craftingOverlay = new CraftingOverlay(this); + public NEUManager(NotEnoughUpdates neu, File configLocation) { this.neu = neu; this.configLocation = configLocation; @@ -802,7 +804,7 @@ public class NEUManager { if (item.has("recipe") && Minecraft.getMinecraft().thePlayer.openContainer instanceof ContainerChest) { ContainerChest container = (ContainerChest) Minecraft.getMinecraft().thePlayer.openContainer; if (container.getLowerChestInventory().getDisplayName().getUnformattedText().equals("Craft Item")) { - CraftingOverlay.updateItem(item); + craftingOverlay.updateItem(item); } } else if(item.has("useneucraft") && item.get("useneucraft").getAsBoolean()) { displayGuiItemRecipe(item.get("internalname").getAsString(), ""); @@ -1188,11 +1190,11 @@ public class NEUManager { writeJson(json, file); } - public static TreeMap getItemInformation() { + public TreeMap getItemInformation() { return itemMap; } - public static String removeUnusedDecimal(double num) { + public String removeUnusedDecimal(double num) { if(num % 1 == 0) { return String.valueOf((int)num); } else { @@ -1200,7 +1202,7 @@ public class NEUManager { } } - public static HashMap getLoreReplacements(String petname, String tier, int level) { + public HashMap getLoreReplacements(String petname, String tier, int level) { JsonObject petnums = null; if(petname != null && tier != null) { petnums = Constants.PETNUMS; @@ -1264,7 +1266,7 @@ public class NEUManager { return replacements; } - public static HashMap getLoreReplacements(NBTTagCompound tag, int level) { + public HashMap getLoreReplacements(NBTTagCompound tag, int level) { String petname = null; String tier = null; if(tag != null && tag.hasKey("ExtraAttributes")) { @@ -1296,7 +1298,7 @@ public class NEUManager { return getLoreReplacements(petname, tier, level); } - public static NBTTagList processLore(JsonArray lore, HashMap replacements) { + public NBTTagList processLore(JsonArray lore, HashMap replacements) { NBTTagList nbtLore = new NBTTagList(); for(JsonElement line : lore) { String lineStr = line.getAsString(); @@ -1311,19 +1313,19 @@ public class NEUManager { return nbtLore; } - public static ItemStack jsonToStack(JsonObject json) { + public ItemStack jsonToStack(JsonObject json) { return jsonToStack(json, true); } - public static ItemStack jsonToStack(JsonObject json, boolean useCache) { + public ItemStack jsonToStack(JsonObject json, boolean useCache) { return jsonToStack(json, useCache, true); } - public static ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements) { + public ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements) { return jsonToStack(json, useCache, useReplacements, true); } - public static ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements, boolean copyStack) { + public ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements, boolean copyStack) { if(json == null) return new ItemStack(Items.painting, 1, 10); String internalname = json.get("internalname").getAsString(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java index 50fa9848..ecc88ccc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java @@ -6,23 +6,25 @@ import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.inventory.GuiChest; -import net.minecraft.client.renderer.GlStateManager; import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import org.luaj.vm2.ast.Str; import org.lwjgl.input.Mouse; import java.util.List; public class CraftingOverlay { - private static ItemStack[] items = new ItemStack[9]; - public static boolean shouldRender = false; - private static String text = null; + private ItemStack[] items = new ItemStack[9]; + private final NEUManager manager; + public boolean shouldRender = false; + private String text = null; - public static void render() { + public CraftingOverlay(NEUManager manager) { + this.manager = manager; + } + + public void render() { if (shouldRender) { ContainerChest container = (ContainerChest) Minecraft.getMinecraft().thePlayer.openContainer; GuiChest gc = (GuiChest) Minecraft.getMinecraft().currentScreen; @@ -38,7 +40,7 @@ public class CraftingOverlay { Slot slot = container.inventorySlots.get(slotIndex); int x = slot.xDisplayPosition + gc.guiLeft; int y = slot.yDisplayPosition + gc.guiTop; - if (!slot.getHasStack() || !slot.getStack().getDisplayName().equals(items[i].getDisplayName()) || + if (!slot.getHasStack() || !manager.getInternalNameForItem(items[i]).equals(manager.getInternalNameForItem(slot.getStack())) || slot.getStack().stackSize < items[i].stackSize) Gui.drawRect(x, y, x + 16, y + 16, 0x64ff0000); @@ -57,7 +59,7 @@ public class CraftingOverlay { } } - public static void updateItem(JsonObject item) { + public void updateItem(JsonObject item) { items = new ItemStack[9]; String[] x = {"1", "2", "3"}; String[] y = {"A", "B", "C"}; @@ -70,9 +72,9 @@ public class CraftingOverlay { count = Integer.parseInt(itemS.split(":")[1]); itemS = itemS.split(":")[0]; } - JsonObject craft = NEUManager.getItemInformation().get(itemS); + JsonObject craft = manager.getItemInformation().get(itemS); if (craft != null) { - ItemStack stack = NEUManager.jsonToStack(craft); + ItemStack stack = manager.jsonToStack(craft); stack.stackSize = count; items[i] = stack; } -- cgit From c14ea38372c30d40820a7bcb7c8f56d407d7022f Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 16 Aug 2021 22:50:00 +0200 Subject: fix double tooltips --- .../github/moulberry/notenoughupdates/overlays/CraftingOverlay.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java index ecc88ccc..8640fd0e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java @@ -42,11 +42,10 @@ public class CraftingOverlay { int y = slot.yDisplayPosition + gc.guiTop; if (!slot.getHasStack() || !manager.getInternalNameForItem(items[i]).equals(manager.getInternalNameForItem(slot.getStack())) || slot.getStack().stackSize < items[i].stackSize) - Gui.drawRect(x, y, - x + 16, y + 16, 0x64ff0000); + Gui.drawRect(x, y, x + 16, y + 16, 0x64ff0000); if (!slot.getHasStack()) Utils.drawItemStack(items[i], x, y); - if (mouseX >= x && mouseX < x + 16 && mouseY >= y && mouseY < y + 16) + if (!slot.getHasStack() && mouseX >= x && mouseX < x + 16 && mouseY >= y && mouseY < y + 16) tooltip = items[i].getTooltip(Minecraft.getMinecraft().thePlayer, false); } } -- cgit From 46df5e8f55ae1147bae9ecba3447605729b3d9f4 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 16 Aug 2021 23:06:46 +0200 Subject: I better stop finding bugs I wanna sleep --- .../io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java index 8640fd0e..9b555dfd 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java @@ -60,6 +60,7 @@ public class CraftingOverlay { public void updateItem(JsonObject item) { items = new ItemStack[9]; + text = null; String[] x = {"1", "2", "3"}; String[] y = {"A", "B", "C"}; for (int i = 0; i < 9; i++) { -- cgit