mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-06-26 06:34:53 +02:00
Add sanity check to conduit nbt handling
This commit is contained in:
parent
d414106d5a
commit
5d2a4e2ef3
|
@ -99,11 +99,11 @@ public class WorldPackets {
|
|||
|
||||
String id = idTag.getValue();
|
||||
if (id.equals("minecraft:conduit")) {
|
||||
StringTag targetUuidTag = compoundTag.remove("target_uuid");
|
||||
if (targetUuidTag == null) return;
|
||||
Tag targetUuidTag = compoundTag.remove("target_uuid");
|
||||
if (!(targetUuidTag instanceof StringTag)) return;
|
||||
|
||||
// target_uuid -> Target
|
||||
UUID targetUuid = UUID.fromString(targetUuidTag.getValue());
|
||||
UUID targetUuid = UUID.fromString((String) targetUuidTag.getValue());
|
||||
compoundTag.put(new IntArrayTag("Target", UUIDIntArrayType.uuidToIntArray(targetUuid)));
|
||||
} else if (id.equals("minecraft:skull") && compoundTag.get("Owner") instanceof CompoundTag) {
|
||||
CompoundTag ownerTag = compoundTag.remove("Owner");
|
||||
|
|
Loading…
Reference in New Issue
Block a user