mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Inline chunk getter
This commit is contained in:
parent
b3f78b4706
commit
722b04cbce
@ -281,8 +281,7 @@ public class InstanceContainer extends Instance {
|
|||||||
@Override
|
@Override
|
||||||
public Chunk getChunk(int chunkX, int chunkZ) {
|
public Chunk getChunk(int chunkX, int chunkZ) {
|
||||||
final long index = ChunkUtils.getChunkIndex(chunkX, chunkZ);
|
final long index = ChunkUtils.getChunkIndex(chunkX, chunkZ);
|
||||||
final Chunk chunk = chunks.get(index);
|
return chunks.get(index);
|
||||||
return ChunkUtils.isLoaded(chunk) ? chunk : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user