mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Address deprecations in queue/generation code (#3658)
This commit is contained in:
@ -26,7 +26,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.plot.world.SinglePlotArea;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import org.bukkit.generator.LimitedRegion;
|
||||
import org.bukkit.generator.WorldInfo;
|
||||
@ -80,7 +80,7 @@ final class BlockStatePopulator extends BlockPopulator {
|
||||
worldInfo.getMaxHeight(),
|
||||
(chunkZ << 4) + 15
|
||||
);
|
||||
ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(wrapped, min, max);
|
||||
ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(wrapped, min, max);
|
||||
this.plotGenerator.populateChunk(offsetChunkQueue, area);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ import com.plotsquared.core.generator.SingleWorldGenerator;
|
||||
import com.plotsquared.core.location.ChunkWrapper;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.plotsquared.core.util.ChunkManager;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import org.bukkit.World;
|
||||
@ -204,7 +204,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
return result.getChunkData();
|
||||
}
|
||||
|
||||
private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) {
|
||||
private void generate(BlockVector2 loc, World world, ZeroedDelegateScopedQueueCoordinator result) {
|
||||
// Load if improperly loaded
|
||||
if (!this.loaded) {
|
||||
checkLoaded(world);
|
||||
|
@ -24,7 +24,7 @@ import com.plotsquared.core.generator.IndependentPlotGenerator;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotId;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.plotsquared.core.util.MathMan;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import org.bukkit.World;
|
||||
@ -60,7 +60,7 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) {
|
||||
public void generateChunk(final ZeroedDelegateScopedQueueCoordinator result, PlotArea settings) {
|
||||
World world = BukkitUtil.getWorld(this.world);
|
||||
Location min = result.getMin();
|
||||
int chunkX = min.getX() >> 4;
|
||||
|
@ -26,7 +26,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.world.SinglePlotArea;
|
||||
import com.plotsquared.core.queue.QueueCoordinator;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||
import com.sk89q.worldedit.util.SideEffectSet;
|
||||
import org.bukkit.Chunk;
|
||||
@ -66,7 +66,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator {
|
||||
queue.setChunkObject(source);
|
||||
Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ);
|
||||
Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15);
|
||||
ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(queue, min, max);
|
||||
ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(queue, min, max);
|
||||
this.plotGenerator.populateChunk(offsetChunkQueue, area);
|
||||
queue.enqueue();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import com.plotsquared.bukkit.util.BukkitBlockUtil;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.core.location.ChunkWrapper;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.plotsquared.core.util.AnnotationHelper;
|
||||
import com.plotsquared.core.util.ChunkUtil;
|
||||
import com.plotsquared.core.util.PatternUtil;
|
||||
@ -45,7 +45,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import java.util.Arrays;
|
||||
|
||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||
public class GenChunk extends ScopedQueueCoordinator {
|
||||
public class GenChunk extends ZeroedDelegateScopedQueueCoordinator {
|
||||
|
||||
public final Biome[] biomes;
|
||||
public BlockState[][] result;
|
||||
|
@ -30,7 +30,7 @@ import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotManager;
|
||||
import com.plotsquared.core.queue.GlobalBlockQueue;
|
||||
import com.plotsquared.core.queue.QueueCoordinator;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.plotsquared.core.util.ChunkManager;
|
||||
import com.plotsquared.core.util.RegionManager;
|
||||
import com.plotsquared.core.util.WorldUtil;
|
||||
@ -257,9 +257,9 @@ public class BukkitRegionManager extends RegionManager {
|
||||
map.saveEntitiesOut(Bukkit.getWorld(world.getName()).getChunkAt(x, z), currentPlotClear);
|
||||
AugmentedUtils.bypass(
|
||||
ignoreAugment,
|
||||
() -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ScopedQueueCoordinator>() {
|
||||
() -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ZeroedDelegateScopedQueueCoordinator>() {
|
||||
@Override
|
||||
public void run(ScopedQueueCoordinator value) {
|
||||
public void run(ZeroedDelegateScopedQueueCoordinator value) {
|
||||
Location min = value.getMin();
|
||||
int bx = min.getX();
|
||||
int bz = min.getZ();
|
||||
|
Reference in New Issue
Block a user