3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-07-03 22:18:04 +02:00

Fix 1.15->1.16 item attribute uuid (#3793)

Dieser Commit ist enthalten in:
AJ Ferguson 2024-04-19 04:09:17 -04:00 committet von GitHub
Ursprung bfde4b953c
Commit 128e191132
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -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");
}
}
}