fix player abilities (incoming)

This commit is contained in:
Bixilon 2020-06-24 16:47:02 +02:00
parent bc253065f1
commit 082e4929b0
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -32,7 +32,8 @@ public class PacketPlayerAbilitiesReceiving implements ClientboundPacket {
@Override
public void read(InPacketBuffer buffer, ProtocolVersion v) {
switch (v) {
case VERSION_1_7_10: {
case VERSION_1_7_10:
case VERSION_1_8: {
byte flags = buffer.readByte();
creative = BitByte.isBitSet(flags, 0);
flying = BitByte.isBitSet(flags, 1);
@ -42,16 +43,6 @@ public class PacketPlayerAbilitiesReceiving implements ClientboundPacket {
walkingSpeed = buffer.readFloat();
break;
}
case VERSION_1_8: {
byte flags = buffer.readByte();
godMode = BitByte.isBitSet(flags, 0);
flying = BitByte.isBitSet(flags, 1);
canFly = BitByte.isBitSet(flags, 2);
creative = BitByte.isBitSet(flags, 3);
flyingSpeed = buffer.readFloat();
// ToDo Entity Properties
break;
}
}
}