fancynpcs: Fix mirror skin for 1.21.9

This commit is contained in:
Oliver
2025-11-04 19:06:14 +01:00
parent 49f2dfd79a
commit ac2a4f6e93
2 changed files with 14 additions and 6 deletions

View File

@@ -1 +1 @@
2.8.0.302 2.8.0.303

View File

@@ -387,11 +387,19 @@ public class Npc_1_21_9 extends Npc {
} }
private ClientboundPlayerInfoUpdatePacket.Entry getEntry(ServerPlayer npcPlayer, ServerPlayer viewer) { private ClientboundPlayerInfoUpdatePacket.Entry getEntry(ServerPlayer npcPlayer, ServerPlayer viewer) {
GameProfile profile = npcPlayer.getGameProfile(); GameProfile profile;
if (data.isMirrorSkin()) { if (!data.isMirrorSkin()) {
GameProfile newProfile = new GameProfile(profile.id(), profile.name()); profile = npcPlayer.getGameProfile();
newProfile.properties().putAll(viewer.getGameProfile().properties()); } else {
profile = newProfile; 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( return new ClientboundPlayerInfoUpdatePacket.Entry(