aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt2
2 files changed, 6 insertions, 1 deletions
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
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index 7616ee323..241f6cbcd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -78,7 +78,7 @@ class ComposterOverlay {
var garden: GardenJson? = null
@SubscribeEvent
- fun onInventoryClose(event: GuiContainerEvent.CloseWindowEvent) {
+ fun onInventoryClose(event: InventoryCloseEvent) {
inInventory = false
}