From 5632c1d50bb0319886fb6acd54df92bf01491532 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 15 Nov 2025 23:42:26 +0100 Subject: snapshot: full 1.21.10 build (- REI; fuck private discord builds) --- .../features/texturepack/predicates/GenericComponentPredicate.kt | 3 ++- .../nea/firmament/features/texturepack/predicates/SkullPredicate.kt | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates') diff --git a/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/GenericComponentPredicate.kt b/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/GenericComponentPredicate.kt index 71392ef..74fd0d6 100644 --- a/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/GenericComponentPredicate.kt +++ b/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/GenericComponentPredicate.kt @@ -16,6 +16,7 @@ import moe.nea.firmament.features.texturepack.FirmamentModelPredicate import moe.nea.firmament.features.texturepack.FirmamentModelPredicateParser import moe.nea.firmament.util.MC import moe.nea.firmament.util.mc.NbtPrism +import moe.nea.firmament.util.mc.unsafeNbt data class GenericComponentPredicate( val componentType: ComponentType, @@ -30,7 +31,7 @@ data class GenericComponentPredicate( val component = stack.get(componentType) ?: return false // TODO: cache this val nbt = - if (component is NbtComponent) component.nbt + if (component is NbtComponent) component.unsafeNbt else codec.encodeStart(NbtOps.INSTANCE, component) .resultOrPartial().getOrNull() ?: return false return path.access(nbt).any { matcher.matches(it) } diff --git a/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/SkullPredicate.kt b/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/SkullPredicate.kt index f17582d..935fe7a 100644 --- a/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/SkullPredicate.kt +++ b/src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/SkullPredicate.kt @@ -36,13 +36,13 @@ class SkullPredicate( override fun test(stack: ItemStack, holder: LivingEntity?): Boolean { if (!stack.isOf(Items.PLAYER_HEAD)) return false val profile = stack.get(DataComponentTypes.PROFILE) ?: return false - val textureProperty = profile.properties["textures"].firstOrNull() + val textureProperty = profile.gameProfile.properties["textures"].firstOrNull() val textureMode = lazy(LazyThreadSafetyMode.NONE) { decodeProfileTextureProperty(textureProperty ?: return@lazy null) } when { profileId != null - && profileId != profile.uuid.getOrNull() -> + && profileId != profile.gameProfile.id -> return false textureValue != null -- cgit