From e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 3 Nov 2024 01:24:24 +0100 Subject: 1.21.3 WIP --- src/main/kotlin/features/inventory/SlotLocking.kt | 25 +++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/main/kotlin/features/inventory/SlotLocking.kt') 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() } -- cgit