Fix getChunkAt

This commit is contained in:
themode 2021-01-13 00:56:53 +01:00
parent 1b1d74ceee
commit ea8b8ea41e

View File

@ -760,8 +760,8 @@ public abstract class Instance implements BlockModifier, EventHandler, DataConta
*/ */
@Nullable @Nullable
public Chunk getChunkAt(float x, float z) { public Chunk getChunkAt(float x, float z) {
final int chunkX = ChunkUtils.getChunkCoordinate((int) x); final int chunkX = ChunkUtils.getChunkCoordinate((int) Math.floor(x));
final int chunkZ = ChunkUtils.getChunkCoordinate((int) z); final int chunkZ = ChunkUtils.getChunkCoordinate((int) Math.floor(z));
return getChunk(chunkX, chunkZ); return getChunk(chunkX, chunkZ);
} }