mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 18:24:43 +02:00
Fix augmented generation
This commit is contained in:
@ -518,7 +518,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
}
|
||||
|
||||
private static void ensureLoaded(final String world, final int x, final int z, final Consumer<Chunk> chunkConsumer) {
|
||||
PaperLib.getChunkAtAsync(getWorld(world), x << 4, z << 4, true).thenAccept(chunk ->
|
||||
PaperLib.getChunkAtAsync(getWorld(world), x >> 4, z >> 4, true).thenAccept(chunk ->
|
||||
ensureMainThread(chunkConsumer, chunk));
|
||||
}
|
||||
|
||||
|
@ -142,13 +142,17 @@ public class BukkitLocalQueue extends BasicLocalBlockQueue {
|
||||
}
|
||||
|
||||
private Chunk getChunk(final World world, final LocalChunk localChunk) {
|
||||
Chunk chunk = null;
|
||||
if (this.getChunkObject() != null && this.getChunkObject() instanceof Chunk) {
|
||||
final Chunk chunk = (Chunk) this.getChunkObject();
|
||||
if (chunk.getWorld().equals(world) && chunk.getX() == localChunk.getX() && chunk.getZ() == localChunk.getZ()) {
|
||||
return chunk;
|
||||
}
|
||||
chunk = (Chunk) this.getChunkObject();
|
||||
}
|
||||
return world.getChunkAt(localChunk.getX(), localChunk.getZ());
|
||||
if (chunk == null) {
|
||||
chunk = world.getChunkAt(localChunk.getX(), localChunk.getZ());
|
||||
}
|
||||
if (!chunk.isLoaded()) {
|
||||
chunk.load(true);
|
||||
}
|
||||
return chunk;
|
||||
}
|
||||
|
||||
private void setMaterial(@NonNull final BlockState plotBlock, @NonNull final Block block) {
|
||||
|
Reference in New Issue
Block a user