mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-21 15:41:38 +01:00
Potentially fix explosion packet
This commit is contained in:
parent
0f02be4b2b
commit
804f11c87b
@ -13,7 +13,8 @@ public class ExplosionPacket implements ServerPacket {
|
||||
public byte[] records = new byte[0];
|
||||
public float playerMotionX, playerMotionY, playerMotionZ;
|
||||
|
||||
public ExplosionPacket() {}
|
||||
public ExplosionPacket() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(@NotNull BinaryWriter writer) {
|
||||
@ -21,7 +22,7 @@ public class ExplosionPacket implements ServerPacket {
|
||||
writer.writeFloat(y);
|
||||
writer.writeFloat(z);
|
||||
writer.writeFloat(radius);
|
||||
writer.writeInt(records.length/3); // each record is 3 bytes long
|
||||
writer.writeVarInt(records.length / 3); // each record is 3 bytes long
|
||||
for (byte record : records)
|
||||
writer.writeByte(record);
|
||||
writer.writeFloat(playerMotionX);
|
||||
|
Loading…
Reference in New Issue
Block a user