diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
commit | e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e (patch) | |
tree | fecc0322e48a399df7697da11adfb022d5641a6c /src/main/kotlin/features/inventory/SlotLocking.kt | |
parent | 646843ba3b960ac48f9866b3640438d3cc1dafc4 (diff) | |
download | Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.gz Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.bz2 Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.zip |
1.21.3 WIP
Diffstat (limited to 'src/main/kotlin/features/inventory/SlotLocking.kt')
-rw-r--r-- | src/main/kotlin/features/inventory/SlotLocking.kt | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/main/kotlin/features/inventory/SlotLocking.kt b/src/main/kotlin/features/inventory/SlotLocking.kt index de54005..5507752 100644 --- a/src/main/kotlin/features/inventory/SlotLocking.kt +++ b/src/main/kotlin/features/inventory/SlotLocking.kt @@ -35,6 +35,7 @@ import moe.nea.firmament.util.mc.ScreenUtil.getSlotByIndex import moe.nea.firmament.util.mc.SlotUtils.swapWithHotBar import moe.nea.firmament.util.mc.displayNameAccordingToNbt import moe.nea.firmament.util.mc.loreAccordingToNbt +import moe.nea.firmament.util.render.drawGuiTexture import moe.nea.firmament.util.render.drawLine import moe.nea.firmament.util.skyblockUUID import moe.nea.firmament.util.unformattedString @@ -332,21 +333,19 @@ object SlotLocking : FirmamentFeature { val isUUIDLocked = (it.slot.stack?.skyblockUUID) in (lockedUUIDs ?: setOf()) if (isSlotLocked || isUUIDLocked) { RenderSystem.disableDepthTest() - it.context.drawSprite( + it.context.drawGuiTexture( it.slot.x, it.slot.y, 0, 16, 16, - MC.guiAtlasManager.getSprite( - when { - isSlotLocked -> - (Identifier.of("firmament:slot_locked")) - - isUUIDLocked -> - (Identifier.of("firmament:uuid_locked")) - - else -> - error("unreachable") - } - ) + when { + isSlotLocked -> + (Identifier.of("firmament:slot_locked")) + + isUUIDLocked -> + (Identifier.of("firmament:uuid_locked")) + + else -> + error("unreachable") + } ) RenderSystem.enableDepthTest() } |