forked from GeyserMC/Geyser
Fix teleportation
This commit is contained in:
parent
ee85abf34c
commit
f52684f0dd
2 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,6 @@
|
||||||
package org.geysermc.connector.network.translators.java.entity;
|
package org.geysermc.connector.network.translators.java.entity;
|
||||||
|
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.entity.ServerEntityPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.entity.ServerEntityPositionRotationPacket;
|
||||||
import com.nukkitx.protocol.bedrock.packet.MoveEntityAbsolutePacket;
|
|
||||||
import org.geysermc.connector.entity.Entity;
|
import org.geysermc.connector.entity.Entity;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
|
|
|
@ -83,6 +83,7 @@ public class JavaPlayerPositionRotationTranslator extends PacketTranslator<Serve
|
||||||
}
|
}
|
||||||
|
|
||||||
session.setSpawned(true);
|
session.setSpawned(true);
|
||||||
|
entity.moveAbsolute(session, Vector3f.from(packet.getX(), packet.getY() + EntityType.PLAYER.getOffset() + 0.1f, packet.getZ()), packet.getYaw(), packet.getPitch(), true);
|
||||||
|
|
||||||
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
session.getDownstream().getSession().send(teleportConfirmPacket);
|
session.getDownstream().getSession().send(teleportConfirmPacket);
|
||||||
|
|
Loading…
Reference in a new issue