From ac2a4f6e93e7b4fff21d3a28ed926786320c4a2b Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 4 Nov 2025 19:06:14 +0100 Subject: [PATCH] fancynpcs: Fix mirror skin for 1.21.9 --- plugins/fancynpcs/VERSION | 2 +- .../oliver/fancynpcs/v1_21_9/Npc_1_21_9.java | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/fancynpcs/VERSION b/plugins/fancynpcs/VERSION index 039ffeaf..5e0b06fa 100644 --- a/plugins/fancynpcs/VERSION +++ b/plugins/fancynpcs/VERSION @@ -1 +1 @@ -2.8.0.302 \ No newline at end of file +2.8.0.303 \ No newline at end of file diff --git a/plugins/fancynpcs/implementation_1_21_9/src/main/java/de/oliver/fancynpcs/v1_21_9/Npc_1_21_9.java b/plugins/fancynpcs/implementation_1_21_9/src/main/java/de/oliver/fancynpcs/v1_21_9/Npc_1_21_9.java index 7b8c0763..d0b68858 100644 --- a/plugins/fancynpcs/implementation_1_21_9/src/main/java/de/oliver/fancynpcs/v1_21_9/Npc_1_21_9.java +++ b/plugins/fancynpcs/implementation_1_21_9/src/main/java/de/oliver/fancynpcs/v1_21_9/Npc_1_21_9.java @@ -387,11 +387,19 @@ public class Npc_1_21_9 extends Npc { } private ClientboundPlayerInfoUpdatePacket.Entry getEntry(ServerPlayer npcPlayer, ServerPlayer viewer) { - GameProfile profile = npcPlayer.getGameProfile(); - if (data.isMirrorSkin()) { - GameProfile newProfile = new GameProfile(profile.id(), profile.name()); - newProfile.properties().putAll(viewer.getGameProfile().properties()); - profile = newProfile; + GameProfile profile; + if (!data.isMirrorSkin()) { + profile = npcPlayer.getGameProfile(); + } else { + Property textures = viewer.getGameProfile().properties().get("textures").iterator().next(); + + PropertyMap propertyMap = new PropertyMap( + ImmutableMultimap.of( + "textures", + new Property("textures", textures.value(), textures.signature()) + ) + ); + profile = new GameProfile(uuid, localName, propertyMap); } return new ClientboundPlayerInfoUpdatePacket.Entry(