mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-13 19:51:27 +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
|
@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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user