Merge pull request #48 from Nesaak/master

Add Entity#getChunk convenience method
This commit is contained in:
TheMode 2020-09-03 00:46:38 +02:00 committed by GitHub
commit 618886f101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
*