diff options
| author | BuildTools <james.jenour@protonmail.com> | 2020-07-08 16:28:49 +1000 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2020-07-08 16:28:49 +1000 |
| commit | 7bdf7f256fe3968fe7129928c0a7100c30628bf9 (patch) | |
| tree | 222deed2be57223e3b1703a638843fbf21a254e7 /src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java | |
| parent | f39c28236bc47a9e5395b041b494fdd7f332734e (diff) | |
| download | notenoughupdates-7bdf7f256fe3968fe7129928c0a7100c30628bf9.tar.gz notenoughupdates-7bdf7f256fe3968fe7129928c0a7100c30628bf9.tar.bz2 notenoughupdates-7bdf7f256fe3968fe7129928c0a7100c30628bf9.zip | |
1.9.7
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java index 0cdef647..613ebe5f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java @@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack; public class GuiItemRecipe extends GuiCrafting { private ItemStack[] craftMatrix; + private JsonObject result; private String text; private String craftText = ""; private NEUManager manager; @@ -20,9 +21,14 @@ public class GuiItemRecipe extends GuiCrafting { public GuiItemRecipe(ItemStack[] craftMatrix, JsonObject result, String text, NEUManager manager) { super(Minecraft.getMinecraft().thePlayer.inventory, Minecraft.getMinecraft().theWorld); this.craftMatrix = craftMatrix; + this.result = result; this.text = text; this.manager = manager; + setContents(); + } + + public void setContents() { ContainerWorkbench cw = (ContainerWorkbench) this.inventorySlots; for(int i=0; i<Math.min(craftMatrix.length, 9); i++) { if(craftMatrix[i] == null) continue; @@ -35,6 +41,8 @@ public class GuiItemRecipe extends GuiCrafting { } protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { + setContents(); + String t = text.equals("") ? I18n.format("container.crafting", new Object[0]) : text; Utils.drawStringScaledMaxWidth(t, fontRendererObj, 28, 6, t.contains("\u00a7"), xSize-38, 4210752); |
