From aff2d8385126e7e3329ed894fb3728bde8f0a79b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 18 May 2023 13:16:35 +0200 Subject: Fixed Composter Overlay and Anita Medal Profit display stuck after exiting inventory via "close" item Fixed #116 --- src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt index 580383e0c..3a018e33a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.* import net.minecraft.item.ItemStack import net.minecraft.network.play.server.S2DPacketOpenWindow +import net.minecraft.network.play.server.S2EPacketCloseWindow import net.minecraft.network.play.server.S2FPacketSetSlot import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -37,6 +38,10 @@ class OtherInventoryData { fun onChatPacket(event: PacketEvent.ReceiveEvent) { val packet = event.packet + if (packet is S2EPacketCloseWindow) { + close() + } + if (packet is S2DPacketOpenWindow) { val windowId = packet.windowId val title = packet.windowTitle.unformattedText -- cgit