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/SkyHanniMod.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index 4386d81b5..05b2d0cdb 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -121,7 +121,7 @@ class SkyHanniMod {
loadModule(ItemTipHelper())
loadModule(RenderLivingEntityHelper())
loadModule(SkillExperience())
- loadModule(OtherInventoryData())
+ loadModule(OtherInventoryData)
loadModule(TabListData())
loadModule(RenderGuiData())
loadModule(GardenCropMilestones())
diff --git a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
index 0044ed6ea..8ff09bba5 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
@@ -22,6 +22,7 @@ import at.hannibal2.skyhanni.config.core.config.Position
import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsX
import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsY
import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getDummySize
+import at.hannibal2.skyhanni.data.OtherInventoryData
import at.hannibal2.skyhanni.utils.GuiRenderUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.client.Minecraft
@@ -40,6 +41,7 @@ class GuiPositionEditor(private val positions: List<Position>, private val borde
override fun onGuiClosed() {
super.onGuiClosed()
clickedPos = -1
+ OtherInventoryData.close()
}
override fun drawScreen(unusedX: Int, unusedY: Int, partialTicks: Float) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
index 3a018e33a..f1cebf640 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
@@ -8,7 +8,7 @@ import net.minecraft.network.play.server.S2FPacketSetSlot
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
-class OtherInventoryData {
+object OtherInventoryData {
private var currentInventory: Inventory? = null
private var acceptItems = false
private var lateEvent: LateInventoryOpenEvent? = null
@@ -18,7 +18,7 @@ class OtherInventoryData {
close()
}
- private fun close() {
+ fun close() {
currentInventory?.let {
InventoryCloseEvent(it).postAndCatch()
currentInventory = null