geforkt von Mirrors/Paper
Added various utility methods to make chunk handling easier. Thanks Meaglin!
Dieser Commit ist enthalten in:
Ursprung
226318d8af
Commit
5b7b46593c
@ -109,6 +109,30 @@ public class CraftChunk implements Chunk {
|
||||
return entities;
|
||||
}
|
||||
|
||||
public boolean isLoaded() {
|
||||
return getWorld().isChunkLoaded(this);
|
||||
}
|
||||
|
||||
public boolean load() {
|
||||
return getWorld().loadChunk(getX(), getZ(), true);
|
||||
}
|
||||
|
||||
public boolean load(boolean generate) {
|
||||
return getWorld().loadChunk(getX(), getZ(), generate);
|
||||
}
|
||||
|
||||
public boolean unload() {
|
||||
return getWorld().unloadChunk(getX(), getZ());
|
||||
}
|
||||
|
||||
public boolean unload(boolean save) {
|
||||
return getWorld().unloadChunk(getX(), getZ(), save);
|
||||
}
|
||||
|
||||
public boolean unload(boolean save, boolean safe) {
|
||||
return getWorld().unloadChunk(getX(), getZ(), save, safe);
|
||||
}
|
||||
|
||||
public ChunkSnapshot getChunkSnapshot() {
|
||||
return getChunkSnapshot(true, false, false);
|
||||
}
|
||||
|
@ -120,6 +120,10 @@ public class CraftWorld implements World {
|
||||
loadChunk(x, z, true);
|
||||
}
|
||||
|
||||
public boolean unloadChunk(Chunk chunk) {
|
||||
return unloadChunk(chunk.getX(), chunk.getZ());
|
||||
}
|
||||
|
||||
public boolean unloadChunk(int x, int z) {
|
||||
return unloadChunk(x, z, true);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren