mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-01 05:58:00 +01:00
Added entity eye height
This commit is contained in:
parent
18a9f2485d
commit
da416866f6
@ -58,6 +58,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
||||
// Velocity
|
||||
protected Vector velocity = new Vector(); // Movement in block per second
|
||||
protected float gravityDragPerTick;
|
||||
protected float eyeHeight;
|
||||
|
||||
private Set<Player> viewers = new CopyOnWriteArraySet<>();
|
||||
private Data data;
|
||||
@ -653,6 +654,14 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
||||
return position;
|
||||
}
|
||||
|
||||
public float getEyeHeight() {
|
||||
return eyeHeight;
|
||||
}
|
||||
|
||||
public void setEyeHeight(float eyeHeight) {
|
||||
this.eyeHeight = eyeHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param position the checked position chunk
|
||||
* @return true if the entity is in the same chunk as {@code position}
|
||||
|
Loading…
Reference in New Issue
Block a user