Improve Region.Area

This commit is contained in:
2026-03-22 15:21:17 +01:00
parent 721d391e74
commit 13f8712325
21 changed files with 148 additions and 160 deletions
@@ -23,7 +23,9 @@ import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.features.region.WireframeCommand;
import de.steamwar.bausystem.region.dynamic.*;
import de.steamwar.bausystem.region.dynamic.global.GlobalRegion;
import de.steamwar.bausystem.region.dynamic.path.PathRegion;
import de.steamwar.bausystem.shared.Pair;
import de.steamwar.bausystem.utils.PasteBuilder;
import lombok.NonNull;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -31,6 +33,7 @@ import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.*;
import java.util.function.Function;
@@ -94,7 +97,18 @@ public class DynamicRegionSystem implements RegionSystem {
// [STDOUT] WET 2
// [STDOUT] WET_SPECIAL 9
regionTypeMap.forEach((type, regions) -> {
System.out.println(type + " " + regions.size());
if (type != RegionType.PATH) return;
MultiTileArea multiTileArea = new MultiTileArea() {
@Override
public void place(Location location, PasteBuilder pasteBuilder, boolean extension) {
}
};
for (Region region : regions) {
PathRegion pathRegion = (PathRegion) region;
multiTileArea.addTile(pathRegion.getTile());
}
multiTileArea.quantize();
});
new DynamicRegionCommand();
new WireframeCommand();