Add Entity#getChunk convenience method

This commit is contained in:
Nesaak 2020-09-02 18:43:42 -04:00
parent 4b8ab2e55e
commit e465b01f66
1 changed files with 9 additions and 0 deletions

View File

@ -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
*