diff options
author | Linnea Gräf <nea@nea.moe> | 2024-01-21 14:06:34 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-01-21 14:06:34 +0100 |
commit | 3e1f75e32253bca3312f478a60d315bec37bc112 (patch) | |
tree | 14260e41bd2d8669d6d3ffa9a9a30d1d9ee2fe6c /src/main/kotlin/moe/nea/firmament/features/texturepack | |
parent | 18ebd21cb0f97dea8367e65002e0bf32e5c686e2 (diff) | |
download | firmament-3e1f75e32253bca3312f478a60d315bec37bc112.tar.gz firmament-3e1f75e32253bca3312f478a60d315bec37bc112.tar.bz2 firmament-3e1f75e32253bca3312f478a60d315bec37bc112.zip |
Bump to 1.20.4
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/texturepack')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt b/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt index 66c0987..11b0a06 100644 --- a/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt +++ b/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt @@ -20,6 +20,7 @@ import moe.nea.firmament.events.TickEvent import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig import moe.nea.firmament.util.IdentityCharacteristics +import moe.nea.firmament.util.MC import moe.nea.firmament.util.item.decodeProfileTextureProperty import moe.nea.firmament.util.skyBlockId @@ -53,10 +54,9 @@ object CustomSkyBlockTextures : FirmamentFeature { private val skullTextureCache = mutableMapOf<IdentityCharacteristics<GameProfile>, Any>() private val sentinelPresentInvalid = Object() - val mcUrlRegex = "https?://textures.minecraft.net/texture/([a-fA-F0-9]+)".toRegex() + private val mcUrlRegex = "https?://textures.minecraft.net/texture/([a-fA-F0-9]+)".toRegex() fun getSkullId(profile: GameProfile): String? { - val textures = profile.properties.get(PlayerSkinProvider.TEXTURES) - val textureProperty = textures.singleOrNull() ?: return null + val textureProperty = MC.instance.sessionService.getPackedTextures(profile) ?: return null val texture = decodeProfileTextureProperty(textureProperty) ?: return null val textureUrl = texture.textures[MinecraftProfileTexture.Type.SKIN]?.url ?: return null |