From 796f1a24d058ab49e9ef5e9fc3a30817c79950dd Mon Sep 17 00:00:00 2001 From: efefury <69400149+efefury@users.noreply.github.com> Date: Tue, 4 Oct 2022 12:18:31 +0000 Subject: no more kicking i think (#335) Co-authored-by: nopo --- .../github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java index f708fb5f..a24f4c84 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java @@ -362,7 +362,11 @@ public abstract class MixinGuiContainer extends GuiScreen { BetterContainers.clickSlot(slotIn.getSlotIndex()); if (BetterContainers.isBlankStack(slotIn.slotNumber, slotIn.getStack())) { - $this.mc.playerController.windowClick($this.inventorySlots.windowId, slotId, 2, clickType, $this.mc.thePlayer); + GuiContainer chest = ((GuiContainer) Minecraft.getMinecraft().currentScreen); + Minecraft.getMinecraft().playerController.windowClick( + chest.inventorySlots.windowId, + slotId, 2, 3, Minecraft.getMinecraft().thePlayer + ); ci.cancel(); } else { Utils.playPressSound(); -- cgit