mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Merge pull request #48 from Nesaak/master
Add Entity#getChunk convenience method
This commit is contained in:
commit
618886f101
@ -625,6 +625,15 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
||||
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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user