fix inconsistent serialize and deserialize in ClientboundPlayerInfoUpdate (#737)

* fix inconsistent serialize and deserialize in ClientboundPlayerInfoUpdatePacket.java (issue #736)

* fix writePositionSource always throws IllegalStateException (issue #738)
This commit is contained in:
cxzlw 2023-07-02 07:34:43 +08:00 committed by GitHub
parent ee030499b5
commit d84fa717fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,6 +107,7 @@ public class ClientboundPlayerInfoUpdatePacket implements MinecraftPacket {
switch (action) {
case ADD_PLAYER:
helper.writeString(out, entry.getProfile().getName());
helper.writeVarInt(out, entry.getProfile().getProperties().size());
for (GameProfile.Property property : entry.getProfile().getProperties()) {
helper.writeProperty(out, property);
}