mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 03:25:11 +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
|
// Store show_entity id as int array instead of uuid string
|
||||||
// Not really required, but we might as well make it more compact
|
// Not really required, but we might as well make it more compact
|
||||||
final JsonObject hoverEvent = value.getAsJsonObject();
|
final JsonObject hoverEvent = value.getAsJsonObject();
|
||||||
|
final CompoundTag convertedTag = (CompoundTag) convertToTag(value);
|
||||||
|
|
||||||
final JsonElement id = hoverEvent.get("id");
|
final JsonElement id = hoverEvent.get("id");
|
||||||
final UUID uuid;
|
final UUID uuid;
|
||||||
if (id != null && id.isJsonPrimitive() && (uuid = UUIDUtil.parseUUID(id.getAsString())) != null) {
|
if (id != null && id.isJsonPrimitive() && (uuid = UUIDUtil.parseUUID(id.getAsString())) != null) {
|
||||||
hoverEvent.remove("id");
|
convertedTag.remove("id");
|
||||||
|
|
||||||
final CompoundTag convertedTag = (CompoundTag) convertToTag(value);
|
|
||||||
convertedTag.put("id", new IntArrayTag(UUIDUtil.toIntArray(uuid)));
|
convertedTag.put("id", new IntArrayTag(UUIDUtil.toIntArray(uuid)));
|
||||||
|
}
|
||||||
|
|
||||||
tag.put(key, convertedTag);
|
tag.put(key, convertedTag);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tag.put(key, convertToTag(value));
|
tag.put(key, convertToTag(value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user