mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-28 21:15:51 +01:00
Fix hoverEvent translation from 1.20.2 to 1.20.3 in some cases (#3591)
This commit is contained in:
parent
18f2cf25cd
commit
0e31664bfe
@ -193,17 +193,18 @@ public final class ComponentConverter {
|
||||
// Store show_entity id as int array instead of uuid string
|
||||
// Not really required, but we might as well make it more compact
|
||||
final JsonObject hoverEvent = value.getAsJsonObject();
|
||||
final CompoundTag convertedTag = (CompoundTag) convertToTag(value);
|
||||
|
||||
final JsonElement id = hoverEvent.get("id");
|
||||
final UUID uuid;
|
||||
if (id != null && id.isJsonPrimitive() && (uuid = UUIDUtil.parseUUID(id.getAsString())) != null) {
|
||||
hoverEvent.remove("id");
|
||||
|
||||
final CompoundTag convertedTag = (CompoundTag) convertToTag(value);
|
||||
convertedTag.remove("id");
|
||||
convertedTag.put("id", new IntArrayTag(UUIDUtil.toIntArray(uuid)));
|
||||
}
|
||||
|
||||
tag.put(key, convertedTag);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
tag.put(key, convertToTag(value));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user