mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancynpcs: Fix skins not showing in 1.21.9
This commit is contained in:
@@ -1 +1 @@
|
|||||||
2.7.1.298
|
2.7.1.299
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package de.oliver.fancynpcs.v1_21_9;
|
package de.oliver.fancynpcs.v1_21_9;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.ImmutableMultimap;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import com.mojang.authlib.properties.Property;
|
import com.mojang.authlib.properties.Property;
|
||||||
|
import com.mojang.authlib.properties.PropertyMap;
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
import de.oliver.fancylib.ReflectionUtils;
|
import de.oliver.fancylib.ReflectionUtils;
|
||||||
import de.oliver.fancynpcs.api.FancyNpcsPlugin;
|
import de.oliver.fancynpcs.api.FancyNpcsPlugin;
|
||||||
@@ -94,10 +96,13 @@ public class Npc_1_21_9 extends Npc {
|
|||||||
String value = data.getSkinData().getTextureValue();
|
String value = data.getSkinData().getTextureValue();
|
||||||
String signature = data.getSkinData().getTextureSignature();
|
String signature = data.getSkinData().getTextureSignature();
|
||||||
|
|
||||||
((ServerPlayer) npc).getGameProfile().properties().replaceValues(
|
PropertyMap propertyMap = new PropertyMap(
|
||||||
|
ImmutableMultimap.of(
|
||||||
"textures",
|
"textures",
|
||||||
ImmutableList.of(new Property("textures", value, signature))
|
new Property("textures", value, signature)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
((ServerPlayer) npc).gameProfile = new GameProfile(uuid, localName, propertyMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
NpcSpawnEvent spawnEvent = new NpcSpawnEvent(this, player);
|
NpcSpawnEvent spawnEvent = new NpcSpawnEvent(this, player);
|
||||||
|
|||||||
Reference in New Issue
Block a user