diff --git a/vcompat-1_17_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_17_R1/entity/Player1_17_R1.java b/vcompat-1_17_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_17_R1/entity/Player1_17_R1.java index 1145314..9ba22fc 100644 --- a/vcompat-1_17_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_17_R1/entity/Player1_17_R1.java +++ b/vcompat-1_17_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_17_R1/entity/Player1_17_R1.java @@ -279,8 +279,8 @@ private final void update(boolean flag) { properties.put("textures", new Property("textures", skin.getValue(), skin.getSignature())); } - String name = getName(); - if (name != null) { + String name = dataAdapter.get("name", WrapType.STRING); + if (name != null && !name.isBlank()) { VersionCompatProvider.get().getLookupProvider().getLookup("mjGameProfile").setFieldValue(profile, "name", name); } diff --git a/vcompat-1_18_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R1/entity/Player1_18_R1.java b/vcompat-1_18_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R1/entity/Player1_18_R1.java index a3ac23a..f2e209b 100644 --- a/vcompat-1_18_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R1/entity/Player1_18_R1.java +++ b/vcompat-1_18_R1/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R1/entity/Player1_18_R1.java @@ -279,8 +279,8 @@ private final void update(boolean flag) { properties.put("textures", new Property("textures", skin.getValue(), skin.getSignature())); } - String name = getName(); - if (name != null) { + String name = dataAdapter.get("name", WrapType.STRING); + if (name != null && !name.isBlank()) { VersionCompatProvider.get().getLookupProvider().getLookup("mjGameProfile").setFieldValue(profile, "name", name); } diff --git a/vcompat-1_18_R2/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R2/entity/Player1_18_R2.java b/vcompat-1_18_R2/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R2/entity/Player1_18_R2.java index e1d9383..f9e7817 100644 --- a/vcompat-1_18_R2/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R2/entity/Player1_18_R2.java +++ b/vcompat-1_18_R2/src/main/java/net/sourcewriters/minecraft/vcompat/provider/impl/v1_18_R2/entity/Player1_18_R2.java @@ -279,8 +279,8 @@ private final void update(boolean flag) { properties.put("textures", new Property("textures", skin.getValue(), skin.getSignature())); } - String name = getName(); - if (name != null) { + String name = dataAdapter.get("name", WrapType.STRING); + if (name != null && !name.isBlank()) { VersionCompatProvider.get().getLookupProvider().getLookup("mjGameProfile").setFieldValue(profile, "name", name); }