mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 13:08:19 +01:00
Fix EntityPropertiesPacket property count
This commit is contained in:
parent
b8d1966ce4
commit
698469aa60
@ -19,12 +19,13 @@ public class EntityPropertiesPacket implements ServerPacket {
|
||||
public int entityId;
|
||||
public Property[] properties = new Property[0];
|
||||
|
||||
public EntityPropertiesPacket() {}
|
||||
public EntityPropertiesPacket() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(@NotNull BinaryWriter writer) {
|
||||
writer.writeVarInt(entityId);
|
||||
writer.writeInt(properties.length);
|
||||
writer.writeVarInt(properties.length);
|
||||
for (Property property : properties) {
|
||||
property.write(writer);
|
||||
}
|
||||
@ -33,7 +34,7 @@ public class EntityPropertiesPacket implements ServerPacket {
|
||||
@Override
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
entityId = reader.readVarInt();
|
||||
int propertyCount = reader.readInt();
|
||||
int propertyCount = reader.readVarInt();
|
||||
properties = new Property[propertyCount];
|
||||
for (int i = 0; i < propertyCount; i++) {
|
||||
properties[i] = new Property();
|
||||
|
Loading…
Reference in New Issue
Block a user