mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 23:26:45 +01:00
Process chunks in order when regenerating all roads
This commit is contained in:
parent
b9f6f9b2b8
commit
026e3fc17e
@ -49,6 +49,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -207,7 +208,7 @@ public class DebugExec extends SubCommand {
|
|||||||
}
|
}
|
||||||
boolean result;
|
boolean result;
|
||||||
if (HybridUtils.regions != null) {
|
if (HybridUtils.regions != null) {
|
||||||
result = this.hybridUtils.scheduleRoadUpdate(area, HybridUtils.regions, 0, new HashSet<>());
|
result = this.hybridUtils.scheduleRoadUpdate(area, HybridUtils.regions, 0, new LinkedHashSet<>());
|
||||||
} else {
|
} else {
|
||||||
result = this.hybridUtils.scheduleRoadUpdate(area, 0);
|
result = this.hybridUtils.scheduleRoadUpdate(area, 0);
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
@ -86,7 +87,7 @@ public class HybridUtils {
|
|||||||
public static HybridUtils manager;
|
public static HybridUtils manager;
|
||||||
public static Set<BlockVector2> regions;
|
public static Set<BlockVector2> regions;
|
||||||
public static int height;
|
public static int height;
|
||||||
public static Set<BlockVector2> chunks = new HashSet<>();
|
public static Set<BlockVector2> chunks = new LinkedHashSet<>();
|
||||||
public static PlotArea area;
|
public static PlotArea area;
|
||||||
public static boolean UPDATE = false;
|
public static boolean UPDATE = false;
|
||||||
|
|
||||||
@ -412,7 +413,7 @@ public class HybridUtils {
|
|||||||
}
|
}
|
||||||
HybridUtils.UPDATE = true;
|
HybridUtils.UPDATE = true;
|
||||||
Set<BlockVector2> regions = this.worldUtil.getChunkChunks(area.getWorldName());
|
Set<BlockVector2> regions = this.worldUtil.getChunkChunks(area.getWorldName());
|
||||||
return scheduleRoadUpdate(area, regions, extend, new HashSet<>());
|
return scheduleRoadUpdate(area, regions, extend, new LinkedHashSet<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean scheduleSingleRegionRoadUpdate(Plot plot, int extend) {
|
public boolean scheduleSingleRegionRoadUpdate(Plot plot, int extend) {
|
||||||
@ -422,7 +423,7 @@ public class HybridUtils {
|
|||||||
HybridUtils.UPDATE = true;
|
HybridUtils.UPDATE = true;
|
||||||
Set<BlockVector2> regions = new HashSet<>();
|
Set<BlockVector2> regions = new HashSet<>();
|
||||||
regions.add(RegionManager.getRegion(plot.getCenterSynchronous()));
|
regions.add(RegionManager.getRegion(plot.getCenterSynchronous()));
|
||||||
return scheduleRoadUpdate(plot.getArea(), regions, extend, new HashSet<>());
|
return scheduleRoadUpdate(plot.getArea(), regions, extend, new LinkedHashSet<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean scheduleRoadUpdate(
|
public boolean scheduleRoadUpdate(
|
||||||
|
Loading…
Reference in New Issue
Block a user