3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-04 23:30:17 +01:00

Block break supported. Ignore the exceptions

Dieser Commit ist enthalten in:
EOT3000 2019-09-27 17:38:52 -04:00
Ursprung 3d986c47fa
Commit 792adb3447
2 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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);
}
}
}

Datei anzeigen

@ -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();