Fix slot locking background not rendering on UUIDless items

This commit is contained in:
nea
2023-10-01 18:57:58 +02:00
parent ec4be71f18
commit d0cc95b1e9

View File

@@ -117,7 +117,7 @@ object SlotLocking : FirmamentFeature {
} }
SlotRenderEvents.Before.subscribe { SlotRenderEvents.Before.subscribe {
val isSlotLocked = it.slot.inventory is PlayerInventory && it.slot.index in (lockedSlots ?: setOf()) val isSlotLocked = it.slot.inventory is PlayerInventory && it.slot.index in (lockedSlots ?: setOf())
val isUUIDLocked = (it.slot.stack?.skyblockUUID ?: return@subscribe) in (lockedUUIDs ?: setOf()) val isUUIDLocked = (it.slot.stack?.skyblockUUID) in (lockedUUIDs ?: setOf())
if (isSlotLocked || isUUIDLocked) { if (isSlotLocked || isUUIDLocked) {
it.context.fill( it.context.fill(
it.slot.x, it.slot.x,