mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Correct packet reading/writing
This commit is contained in:
parent
30f3fdd99a
commit
abace56778
@ -36,7 +36,7 @@ public class ExplosionPacket implements ServerPacket {
|
|||||||
y = reader.readFloat();
|
y = reader.readFloat();
|
||||||
z = reader.readFloat();
|
z = reader.readFloat();
|
||||||
radius = reader.readFloat();
|
radius = reader.readFloat();
|
||||||
int recordCount = reader.readInt() * 3;
|
int recordCount = reader.readVarInt() * 3;
|
||||||
records = reader.readBytes(recordCount);
|
records = reader.readBytes(recordCount);
|
||||||
playerMotionX = reader.readFloat();
|
playerMotionX = reader.readFloat();
|
||||||
playerMotionY = reader.readFloat();
|
playerMotionY = reader.readFloat();
|
||||||
|
@ -73,11 +73,15 @@ public class MapDataPacket implements ComponentHoldingServerPacket {
|
|||||||
locked = reader.readBoolean();
|
locked = reader.readBoolean();
|
||||||
trackingPosition = reader.readBoolean();
|
trackingPosition = reader.readBoolean();
|
||||||
|
|
||||||
int iconCount = reader.readVarInt();
|
if (trackingPosition) {
|
||||||
icons = new Icon[iconCount];
|
int iconCount = reader.readVarInt();
|
||||||
for (int i = 0; i < iconCount; i++) {
|
icons = new Icon[iconCount];
|
||||||
icons[i] = new Icon();
|
for (int i = 0; i < iconCount; i++) {
|
||||||
icons[i].read(reader);
|
icons[i] = new Icon();
|
||||||
|
icons[i].read(reader);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
icons = new Icon[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
columns = reader.readByte();
|
columns = reader.readByte();
|
||||||
|
Loading…
Reference in New Issue
Block a user