diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-09 22:40:37 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-09 22:40:37 +0100 |
commit | 342d03543b9471320ad5c202d0a965aaf5c52eb0 (patch) | |
tree | 5a1ebb91d977dad12e0186d3b9366f13dae12ab4 /src/main/java/at/hannibal2 | |
parent | bbba0adc2ee9e6e1034ca79c8b27cbe08599e1e8 (diff) | |
download | skyhanni-342d03543b9471320ad5c202d0a965aaf5c52eb0.tar.gz skyhanni-342d03543b9471320ad5c202d0a965aaf5c52eb0.tar.bz2 skyhanni-342d03543b9471320ad5c202d0a965aaf5c52eb0.zip |
make garden desk icon only show in actual skyblock menu and not in inventory
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt index e62591e47..68c35b64d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt @@ -9,6 +9,7 @@ import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent import io.github.moulberry.notenoughupdates.events.SlotClickEvent import io.github.moulberry.notenoughupdates.util.Utils import net.minecraft.client.Minecraft +import net.minecraft.client.player.inventory.ContainerLocalMenu import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -35,7 +36,7 @@ class GardenDeskInSBMenu { @SubscribeEvent fun replaceItem(event: ReplaceItemEvent) { - if (showItem && event.slotNumber == 10) { + if (event.inventory is ContainerLocalMenu && showItem && event.slotNumber == 10) { event.replaceWith(item) } } |