Fix 1.15->1.16 item attribute uuid (#3793)
This commit is contained in:
parent
bfde4b953c
commit
128e191132
|
@ -203,8 +203,10 @@ public class InventoryPackets extends ItemRewriter<ClientboundPackets1_15, Serve
|
|||
NumberTag leastTag = attribute.getNumberTag("UUIDLeast");
|
||||
NumberTag mostTag = attribute.getNumberTag("UUIDMost");
|
||||
if (leastTag != null && mostTag != null) {
|
||||
int[] uuidIntArray = UUIDUtil.toIntArray(leastTag.asLong(), mostTag.asLong());
|
||||
int[] uuidIntArray = UUIDUtil.toIntArray(mostTag.asLong(), leastTag.asLong());
|
||||
attribute.put("UUID", new IntArrayTag(uuidIntArray));
|
||||
attribute.remove("UUIDLeast");
|
||||
attribute.remove("UUIDMost");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223,6 +225,7 @@ public class InventoryPackets extends ItemRewriter<ClientboundPackets1_15, Serve
|
|||
UUID uuid = UUIDUtil.fromIntArray(uuidTag.getValue());
|
||||
attribute.putLong("UUIDLeast", uuid.getLeastSignificantBits());
|
||||
attribute.putLong("UUIDMost", uuid.getMostSignificantBits());
|
||||
attribute.remove("UUID");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue