aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index 2ec370dee..b6ae8f105 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -48,6 +48,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.network.play.client.C09PacketHeldItemChange
import net.minecraft.util.AxisAlignedBB
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
object GardenAPI {
@@ -96,6 +97,11 @@ object GardenAPI {
fun onInventoryClose(event: InventoryCloseEvent) {
if (!inGarden()) return
checkItemInHand()
+ DelayedRun.runDelayed(500.milliseconds) {
+ if (inGarden()) {
+ checkItemInHand()
+ }
+ }
}
@SubscribeEvent