The bot falling down when teleporting does not work
Closed this issue · 6 comments
What could be the problem?
if (receiveEvent.getPacket() instanceof ServerPlayerPositionRotationPacket) {
ServerPlayerPositionRotationPacket packet = receiveEvent.getPacket();
client.getSession().send(new ClientTeleportConfirmPacket(packet.getTeleportId()));
}
Are you using latest MCPL? The class names don't match up. What are you coding? Client or server?
What do you mean by "falling down"?
Also, just to be clear - this issue page isn't for help when you're not properly implementing the java protocol. In that case, you can join the GeyserMC Discord and ask in the MCPL channel, and someone might help you if they have the time.
I'm using minecraftprotocollib 1.12.2-2. look, I have a problem when a bot enters the server and for example I teleport him into the air, he just freezes and does not fall down like a regular player, how can I fix this? Write client.
What do you mean by "falling down"?
Also, just to be clear - this issue page isn't for help when you're not properly implementing the java protocol. In that case, you can join the GeyserMC Discord and ask in the MCPL channel, and someone might help you if they have the time.
MCPL does not provide support for older releases afaik, especially not such old. I personally recommend just implementing ViaVersion with MCProtocolLib to downgrade your packets, but I don't have time to explain how to integrate my code.
MCPL does not provide support for older releases afaik, especially not such old. I personally recommend just implementing ViaVersion with MCProtocolLib to downgrade your packets, but I don't have time to explain how to integrate my code.
Okay. I'm update mcp to 1.20.2, How can I make the bot fall when teleporting?
client.addListener(new SessionAdapter() {
@Override
public void packetReceived(Session session, Packet packet) {
if (packet instanceof ClientboundLoginPacket) {
session.send(new ServerboundChatPacket("I'm joined!", Instant.now().toEpochMilli(), 0L, null, 0, new BitSet()));
}
}
@Override
public void disconnected(DisconnectedEvent event) {
System.out.println("Disconnected: " + event.getReason());
if (event.getCause() != null) {
event.getCause().printStackTrace();
}
}
});
If you need help implementing the Minecraft protocol, please join the Discord server and there we can chat. Issues are rather for bugs in the code than implementing the Minecraft protocol.