aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-20 16:45:51 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-20 16:45:51 +0200
commit0859fa773b2cc3496ae51bcad622bca0a596621b (patch)
tree04425a983ce2cedc01b6ffeead3a9cb7937845cd /src/main/kotlin/moe/nea/firmament
parent3ad44b992fbb6859b01a99eae1a317ea67754e4d (diff)
downloadfirmament-0859fa773b2cc3496ae51bcad622bca0a596621b.tar.gz
firmament-0859fa773b2cc3496ae51bcad622bca0a596621b.tar.bz2
firmament-0859fa773b2cc3496ae51bcad622bca0a596621b.zip
No longer block you from taking out items from the salvage menu
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament')
-rw-r--r--src/main/kotlin/moe/nea/firmament/features/inventory/SlotLocking.kt5
1 files 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)) {