From e82c5c5eb2cff03690c71d413b6c4f724a7861fc Mon Sep 17 00:00:00 2001 From: matthias-luger <58751503+matthias-luger@users.noreply.github.com> Date: Mon, 13 Mar 2023 07:59:18 +0100 Subject: set lower and upper inventory of GuiChest correctly (#96) --- src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java | 2 +- src/main/java/de/torui/coflsky/gui/bingui/BinGuiManager.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java index ef5ec9c..edb87d0 100644 --- a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java +++ b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java @@ -57,7 +57,7 @@ public class BinGuiCurrent extends GuiChest { private GuiChest chestGui; public BinGuiCurrent(IInventory playerInventory, IInventory chestInventory, String message, String extraData) { - super(chestInventory, playerInventory); + super(playerInventory, chestInventory); this.message = message; this.lore = new String[]{"Loading..."}; if (extraData.length() >= 32) { diff --git a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiManager.java b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiManager.java index db0b110..fe70177 100644 --- a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiManager.java +++ b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiManager.java @@ -4,6 +4,7 @@ import de.torui.coflsky.CoflSky; import de.torui.coflsky.gui.GUIType; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.inventory.InventoryBasic; import org.lwjgl.input.Mouse; public class BinGuiManager { @@ -12,7 +13,8 @@ public class BinGuiManager { if( CoflSky.config.purchaseOverlay != GUIType.COFL){ return; } - GuiChest currentGui = new BinGuiCurrent(Minecraft.getMinecraft().thePlayer.inventory, null, message, extraData); + + GuiChest currentGui = new BinGuiCurrent(Minecraft.getMinecraft().thePlayer.inventory, new InventoryBasic("", false, 27), message, extraData); Mouse.setGrabbed(false); Minecraft.getMinecraft().displayGuiScreen(currentGui); } -- cgit