mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-04 05:54:46 +01:00
Fix: Don't include player offset when querying player position in the api (#5168)
This commit is contained in:
parent
47b68f8140
commit
c145c3f495
2 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue