diff --git a/api/src/main/java/org/geysermc/geyser/api/entity/type/player/GeyserPlayerEntity.java b/api/src/main/java/org/geysermc/geyser/api/entity/type/player/GeyserPlayerEntity.java index bba4dbf3e..d31def996 100644 --- a/api/src/main/java/org/geysermc/geyser/api/entity/type/player/GeyserPlayerEntity.java +++ b/api/src/main/java/org/geysermc/geyser/api/entity/type/player/GeyserPlayerEntity.java @@ -31,9 +31,9 @@ import org.geysermc.geyser.api.entity.type.GeyserEntity; public interface GeyserPlayerEntity extends GeyserEntity { /** - * Gets the position of the player. + * Gets the position of the player, as it is known to the Java server. * - * @return the position of the player. + * @return the player's position */ Vector3f position(); } diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java index 7e747e33d..7a443d6e8 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java @@ -97,11 +97,11 @@ public class PlayerEntity extends LivingEntity implements GeyserPlayerEntity { /** * Saves the parrot currently on the player's left shoulder; otherwise null */ - private ParrotEntity leftParrot; + private @Nullable ParrotEntity leftParrot; /** * Saves the parrot currently on the player's right shoulder; otherwise null */ - private ParrotEntity rightParrot; + private @Nullable ParrotEntity rightParrot; public PlayerEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, Vector3f position, Vector3f motion, float yaw, float pitch, float headYaw, String username, @Nullable String texturesProperty) { @@ -450,6 +450,6 @@ public class PlayerEntity extends LivingEntity implements GeyserPlayerEntity { @Override public Vector3f position() { - return this.position.clone(); + return this.position.down(definition.offset()); } }