From 4c1f8d0fd535ffe7d5d37f0827e06dbc8123fdbb Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Sun, 4 Jun 2023 12:54:46 +0200 Subject: Fixed compatibility with Skytils and Patcher (#207) --- .../at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt index e5df053fd..fb48d73fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt @@ -31,6 +31,7 @@ object GardenPlotIcon { private var originalStack = mutableMapOf() private var cachedStack = mutableMapOf() private val editStack = ItemStack(Items.wooden_axe) + private val whitelistedSlot = listOf(2, 3, 4, 5, 6, 11, 12, 13, 14, 15, 20, 21, 23, 24, 29, 30, 31, 32, 33, 38, 39, 40, 41, 42) var hardReset = false @@ -111,7 +112,7 @@ object GardenPlotIcon { } if (event.slotId != 53) { val plotList = plotList ?: return - if (!event.slot.stack.displayName.removeColor().startsWith("Plot")) return + if (!whitelistedSlot.contains(event.slotId)) return event.isCanceled = true if (editMode == 2) { plotList.remove(event.slotId) -- cgit