mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-07 08:58:20 +01:00
Add Entity#getChunk convenience method
This commit is contained in:
parent
4b8ab2e55e
commit
e465b01f66
@ -625,6 +625,15 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
|||||||
this.boundingBox = new BoundingBox(this, x, y, z);
|
this.boundingBox = new BoundingBox(this, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to get the entity current chunk
|
||||||
|
*
|
||||||
|
* @return the entity chunk
|
||||||
|
*/
|
||||||
|
public Chunk getChunk() {
|
||||||
|
return instance.getChunkAt(lastX, lastZ);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the entity current instance
|
* Get the entity current instance
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user