Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-12 19:10:19 +01: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.
Dieser Commit ist enthalten in:
Ursprung
33af9e094c
Commit
3716b7a84f
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren