aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-18 17:13:47 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-18 17:13:47 +0200
commit3b22cc895f83720554ba0983872a9567ebcee7c5 (patch)
treea7e21da72842a069bb10a3da7c9becd4e9432fba /src/main/java/at/hannibal2/skyhanni
parent90eea5be4514304ed00179e1bd26049b76e0063b (diff)
downloadskyhanni-3b22cc895f83720554ba0983872a9567ebcee7c5.tar.gz
skyhanni-3b22cc895f83720554ba0983872a9567ebcee7c5.tar.bz2
skyhanni-3b22cc895f83720554ba0983872a9567ebcee7c5.zip
Fixed crash when opening minion inventory
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
index 887b17a2a..69beaa303 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -20,6 +20,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.matchRegex
import net.minecraft.client.Minecraft
+import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.entity.EntityLivingBase
import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.client.event.GuiScreenEvent
@@ -147,10 +148,10 @@ class MinionFeatures {
fun onTick(event: TickEvent.ClientTickEvent) {
if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
- if (config.hopperProfitDisplay) {
- coinsPerDay = if (minionInventoryOpen) {
- updateCoinsPerDay()
- } else ""
+ if (Minecraft.getMinecraft().currentScreen is GuiChest) {
+ if (config.hopperProfitDisplay) {
+ coinsPerDay = if (minionInventoryOpen) updateCoinsPerDay() else ""
+ }
}
}