From 0859fa773b2cc3496ae51bcad622bca0a596621b Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 20 Jul 2024 16:45:51 +0200 Subject: No longer block you from taking out items from the salvage menu --- src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt b/src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt index 70b887c..fbae4bf 100644 --- a/src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt +++ b/src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt @@ -18,7 +18,6 @@ import kotlinx.serialization.serializer import net.minecraft.client.gui.screen.ingame.HandledScreen import net.minecraft.entity.player.PlayerInventory import net.minecraft.screen.GenericContainerScreenHandler -import net.minecraft.screen.slot.Slot import net.minecraft.screen.slot.SlotActionType import net.minecraft.util.Identifier import moe.nea.firmament.annotations.Subscribe @@ -124,7 +123,9 @@ object SlotLocking : FirmamentFeature { || event.actionType == SlotActionType.PICKUP_ALL val isSellOrTradeScreen = isNpcShop(MC.handledScreen) || isTradeScreen(MC.handledScreen) || isSalvageScreen(MC.handledScreen) - if (!isSellOrTradeScreen && doesNotDeleteItem) return + if ((!isSellOrTradeScreen || event.slot?.inventory !is PlayerInventory) + && doesNotDeleteItem + ) return val stack = event.itemStack ?: return val uuid = stack.skyblockUUID ?: return if (uuid in (lockedUUIDs ?: return)) { -- cgit