mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 18:50:51 +01:00
#1171: Add method to get chunk load level
By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
parent
747897f79b
commit
f4abdeb3f9
1 changed files with 9 additions and 0 deletions
|
@ -352,6 +352,15 @@ public class CraftChunk implements Chunk {
|
||||||
return getHandle(ChunkStatus.STRUCTURE_STARTS).persistentDataContainer;
|
return getHandle(ChunkStatus.STRUCTURE_STARTS).persistentDataContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LoadLevel getLoadLevel() {
|
||||||
|
net.minecraft.world.level.chunk.Chunk chunk = worldServer.getChunkIfLoaded(getX(), getZ());
|
||||||
|
if (chunk == null) {
|
||||||
|
return LoadLevel.UNLOADED;
|
||||||
|
}
|
||||||
|
return LoadLevel.values()[chunk.getFullStatus().ordinal()];
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
|
|
Loading…
Reference in a new issue