Break all the bedrock action switch cases

This commit is contained in:
Redned 2019-09-27 18:04:58 -05:00 committed by GitHub
parent a36f0ba5b6
commit a18bbaf9ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,18 +90,19 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
Hand.MAIN_HAND, 0, 0, 0, false); Hand.MAIN_HAND, 0, 0, 0, false);
session.getDownstream().getSession().send(blockPacket); session.getDownstream().getSession().send(blockPacket);
break;
case START_BREAK: case START_BREAK:
ClientPlayerActionPacket actionPacket = new ClientPlayerActionPacket(PlayerAction.START_DIGGING, position, BlockFace.values()[packet.getFace()]); ClientPlayerActionPacket actionPacket = new ClientPlayerActionPacket(PlayerAction.START_DIGGING, position, BlockFace.values()[packet.getFace()]);
session.getDownstream().getSession().send(actionPacket); session.getDownstream().getSession().send(actionPacket);
break;
case ABORT_BREAK: case ABORT_BREAK:
ClientPlayerActionPacket actionPacket2 = new ClientPlayerActionPacket(PlayerAction.CANCEL_DIGGING, position, BlockFace.values()[packet.getFace()]); ClientPlayerActionPacket actionPacket2 = new ClientPlayerActionPacket(PlayerAction.CANCEL_DIGGING, position, BlockFace.values()[packet.getFace()]);
session.getDownstream().getSession().send(actionPacket2); session.getDownstream().getSession().send(actionPacket2);
break;
case STOP_BREAK: case STOP_BREAK:
ClientPlayerActionPacket actionPacket3 = new ClientPlayerActionPacket(PlayerAction.FINISH_DIGGING, position, BlockFace.values()[packet.getFace()]); ClientPlayerActionPacket actionPacket3 = new ClientPlayerActionPacket(PlayerAction.FINISH_DIGGING, position, BlockFace.values()[packet.getFace()]);
session.getDownstream().getSession().send(actionPacket3); session.getDownstream().getSession().send(actionPacket3);
break;
} }
} }
} }