mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-27 19:24:43 +02:00
Start reimplementing chunk generation.
This would either need to be one WorldEdit operation or (preferable) WorldEdit allows Extents (including EditSessions) into the regenerate adapter method
This commit is contained in:
@ -32,11 +32,12 @@ import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.queue.QueueCoordinator;
|
||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Random;
|
||||
|
||||
final class BlockStatePopulator extends BlockPopulator {
|
||||
@ -52,12 +53,11 @@ final class BlockStatePopulator extends BlockPopulator {
|
||||
this.plotAreaManager = plotAreaManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populate(@Nonnull final World world, @Nonnull final Random random,
|
||||
@Override public void populate(@Nonnull final World world, @Nonnull final Random random,
|
||||
@Nonnull final Chunk source) {
|
||||
if (this.queue == null) {
|
||||
this.queue = PlotSquared.platform().getGlobalBlockQueue()
|
||||
.getNewQueue(world.getName());
|
||||
this.queue =
|
||||
PlotSquared.platform().getGlobalBlockQueue().getNewQueue(new BukkitWorld(world));
|
||||
}
|
||||
final PlotArea area = this.plotAreaManager.getPlotArea(world.getName(), null);
|
||||
if (area == null) {
|
||||
|
Reference in New Issue
Block a user