mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 02:57:37 +01:00
Fix getChunkAt
This commit is contained in:
parent
1b1d74ceee
commit
ea8b8ea41e
@ -760,8 +760,8 @@ public abstract class Instance implements BlockModifier, EventHandler, DataConta
|
||||
*/
|
||||
@Nullable
|
||||
public Chunk getChunkAt(float x, float z) {
|
||||
final int chunkX = ChunkUtils.getChunkCoordinate((int) x);
|
||||
final int chunkZ = ChunkUtils.getChunkCoordinate((int) z);
|
||||
final int chunkX = ChunkUtils.getChunkCoordinate((int) Math.floor(x));
|
||||
final int chunkZ = ChunkUtils.getChunkCoordinate((int) Math.floor(z));
|
||||
return getChunk(chunkX, chunkZ);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user