mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Remove initialized check in movement
This probably isn't needed anymore. This was introduced in https://github.com/GeyserMC/Geyser/pull/41 and is probably no longer needed since we never send movement before the player is spawned, and we don't allow movement to go through until the Bedrock player matches the unconfirmed teleport we create in JavaPlayerPositionTranslator. By removing this we should fix some instances of players kicked for 'flying' as players joining in the air would never respond to gravity until Bedrock finished loading.
This commit is contained in:
parent
33af9e094c
commit
3716b7a84f
1 changed files with 1 additions and 13 deletions
|
@ -31,13 +31,12 @@ import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.Server
|
|||
import com.github.steveice10.packetlib.packet.Packet;
|
||||
import com.nukkitx.math.vector.Vector3d;
|
||||
import com.nukkitx.math.vector.Vector3f;
|
||||
import com.nukkitx.protocol.bedrock.packet.MoveEntityAbsolutePacket;
|
||||
import com.nukkitx.protocol.bedrock.packet.MovePlayerPacket;
|
||||
import org.geysermc.geyser.entity.EntityDefinitions;
|
||||
import org.geysermc.geyser.entity.type.player.SessionPlayerEntity;
|
||||
import org.geysermc.geyser.level.BedrockDimension;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.text.ChatColor;
|
||||
import org.geysermc.geyser.level.BedrockDimension;
|
||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||
import org.geysermc.geyser.translator.protocol.Translator;
|
||||
|
||||
|
@ -49,17 +48,6 @@ public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPack
|
|||
SessionPlayerEntity entity = session.getPlayerEntity();
|
||||
if (!session.isSpawned()) return;
|
||||
|
||||
if (!session.getUpstream().isInitialized()) {
|
||||
MoveEntityAbsolutePacket moveEntityBack = new MoveEntityAbsolutePacket();
|
||||
moveEntityBack.setRuntimeEntityId(entity.getGeyserId());
|
||||
moveEntityBack.setPosition(entity.getPosition());
|
||||
moveEntityBack.setRotation(entity.getBedrockRotation());
|
||||
moveEntityBack.setTeleported(true);
|
||||
moveEntityBack.setOnGround(true);
|
||||
session.sendUpstreamPacketImmediately(moveEntityBack);
|
||||
return;
|
||||
}
|
||||
|
||||
session.setLastMovementTimestamp(System.currentTimeMillis());
|
||||
|
||||
// Send book update before the player moves
|
||||
|
|
Loading…
Reference in a new issue