diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-05-07 23:05:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 23:05:27 +0200 |
commit | 37378e2677aa60039f57895e3d955bd719cd29b5 (patch) | |
tree | 3250f907f566c3b12167636d4252f225df8fd07a /src/main/java/at | |
parent | 2584f0f1a451fcbc5f7ba38c65678e08ee397d23 (diff) | |
download | skyhanni-37378e2677aa60039f57895e3d955bd719cd29b5.tar.gz skyhanni-37378e2677aa60039f57895e3d955bd719cd29b5.tar.bz2 skyhanni-37378e2677aa60039f57895e3d955bd719cd29b5.zip |
Fix: Farming tool detection (#1692)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt | 6 |
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 |