mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancynpcs: Fix mirror skin for 1.21.9
This commit is contained in:
@@ -1 +1 @@
|
|||||||
2.8.0.302
|
2.8.0.303
|
||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user