forked from GeyserMC/Geyser
Block break supported. Ignore the exceptions
This commit is contained in:
parent
3d986c47fa
commit
792adb3447
2 changed files with 13 additions and 0 deletions
|
@ -90,6 +90,18 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
|
|||
Hand.MAIN_HAND, 0, 0, 0, false);
|
||||
|
||||
session.getDownstream().getSession().send(blockPacket);
|
||||
case START_BREAK:
|
||||
ClientPlayerActionPacket actionPacket = new ClientPlayerActionPacket(PlayerAction.START_DIGGING, position, BlockFace.values()[packet.getFace()]);
|
||||
session.getDownstream().getSession().send(actionPacket);
|
||||
|
||||
case ABORT_BREAK:
|
||||
ClientPlayerActionPacket actionPacket2 = new ClientPlayerActionPacket(PlayerAction.CANCEL_DIGGING, position, BlockFace.values()[packet.getFace()]);
|
||||
session.getDownstream().getSession().send(actionPacket2);
|
||||
case STOP_BREAK:
|
||||
ClientPlayerActionPacket actionPacket3 = new ClientPlayerActionPacket(PlayerAction.FINISH_DIGGING, position, BlockFace.values()[packet.getFace()]);
|
||||
session.getDownstream().getSession().send(actionPacket3);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ public class JavaJoinGameTranslator extends PacketTranslator<ServerJoinGamePacke
|
|||
public void translate(ServerJoinGamePacket packet, GeyserSession session) {
|
||||
AdventureSettingsPacket bedrockPacket = new AdventureSettingsPacket();
|
||||
bedrockPacket.setUniqueEntityId(session.getPlayerEntity().getGeyserId());
|
||||
bedrockPacket.setPlayerPermission(1);
|
||||
session.getUpstream().sendPacketImmediately(bedrockPacket);
|
||||
|
||||
PlayStatusPacket playStatus = new PlayStatusPacket();
|
||||
|
|
Loading…
Reference in a new issue