From aaa8a9d122b2ef95790d9efeec80d7efdd9dbbd1 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Fri, 6 Mar 2026 18:35:34 +0100 Subject: [PATCH] Improve update propagation performance --- .../region/DynamicRegionCommand.java | 2 +- .../bausystem/region/DynamicRegionSystem.java | 44 ++++--- .../region/dynamic/DynamicRegion.java | 19 ++- .../region/dynamic/NeighbourDirection.java | 59 ++++++++++ .../bausystem/region/dynamic/Tile.java | 5 + .../region/dynamic/path/PathArea.java | 110 +++++++----------- .../region/dynamic/path/PathCorner.java | 38 ++++++ .../region/dynamic/path/PathRegion.java | 15 +-- .../region/dynamic/path/PathSide.java | 37 ++++++ .../region/dynamic/path/SelectorCorner.java | 2 +- .../region/dynamic/path/SelectorSide.java | 2 +- 11 files changed, 231 insertions(+), 102 deletions(-) create mode 100644 BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/NeighbourDirection.java create mode 100644 BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathCorner.java create mode 100644 BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathSide.java diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionCommand.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionCommand.java index 94a231e5..16c93e94 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionCommand.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionCommand.java @@ -53,7 +53,7 @@ public class DynamicRegionCommand extends SWCommand { dynamicRegion.getArea().reset(new PasteBuilder(new PasteBuilder.FileProvider(dynamicRegion.getArea().getResetFile())), false); // TODO: This here still has some kind of error!aww - DynamicRegionSystem.INSTANCE.getNeighbours(dynamicRegion).forEach(r -> r.update(dynamicRegion)); + dynamicRegion.updateNeighbours(); } @Register({"dynamic", "delete"}) diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionSystem.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionSystem.java index bb853a43..3fb684d6 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionSystem.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/DynamicRegionSystem.java @@ -20,12 +20,11 @@ package de.steamwar.bausystem.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.dynamic.DynamicRegion; -import de.steamwar.bausystem.region.dynamic.DynamicRegionRepository; -import de.steamwar.bausystem.region.dynamic.RegionConstructorData; -import de.steamwar.bausystem.region.dynamic.Tile; +import de.steamwar.bausystem.region.dynamic.*; import de.steamwar.bausystem.region.dynamic.global.GlobalRegion; +import de.steamwar.bausystem.shared.Pair; import lombok.NonNull; +import org.bukkit.Bukkit; import org.bukkit.Location; import javax.annotation.Nullable; @@ -92,7 +91,7 @@ public class DynamicRegionSystem implements RegionSystem { @Override public @NonNull Location getWorldSpawn() { - return null; + return Bukkit.getWorlds().get(0).getSpawnLocation(); // TODO: Temporary } @Override @@ -139,29 +138,40 @@ public class DynamicRegionSystem implements RegionSystem { return regionMap.values().stream(); } - private Stream getNeighbours(Region region, boolean noCorners, boolean fastCache, Collection regions) { + private Stream> getNeighbours(Region region, boolean noCorners, boolean fastCache, Collection regions) { Point minPoint = region.getArea().getMinPoint(false).subtract(TILE_SIZE_ADJUSTED, 0, TILE_SIZE_ADJUSTED); Point maxPoint = region.getArea().getMaxPoint(false).add(Tile.tileSize, 0, Tile.tileSize); - Set neighbours = new HashSet<>(); + Set> neighbours = new HashSet<>(); for (int x = minPoint.getX() + (noCorners ? TILE_SIZE_ADJUSTED : 0); x <= maxPoint.getX() - (noCorners ? Tile.tileSize : 0); x += Tile.tileSize) { - neighbours.add(get(x, minPoint.getZ(), fastCache, regions)); - neighbours.add(get(x, maxPoint.getZ(), fastCache, regions)); + NeighbourDirection minZ = NeighbourDirection.North; + if (!noCorners) { + if (x == minPoint.getX()) minZ = NeighbourDirection.NorthWest; + if (x > maxPoint.getX() - TILE_SIZE_ADJUSTED) minZ = NeighbourDirection.NorthEast; + } + neighbours.add(new Pair<>(get(x, minPoint.getZ(), fastCache, regions), minZ)); + + NeighbourDirection maxZ = NeighbourDirection.South; + if (!noCorners) { + if (x == minPoint.getX()) maxZ = NeighbourDirection.SouthWest; + if (x > maxPoint.getX() - TILE_SIZE_ADJUSTED) maxZ = NeighbourDirection.SouthEast; + } + neighbours.add(new Pair<>(get(x, maxPoint.getZ(), fastCache, regions), maxZ)); } for (int z = minPoint.getZ() + TILE_SIZE_ADJUSTED; z <= maxPoint.getZ() - Tile.tileSize; z += Tile.tileSize) { - neighbours.add(get(minPoint.getX(), z, fastCache, regions)); - neighbours.add(get(maxPoint.getX(), z, fastCache, regions)); + neighbours.add(new Pair<>(get(minPoint.getX(), z, fastCache, regions), NeighbourDirection.West)); + neighbours.add(new Pair<>(get(maxPoint.getX(), z, fastCache, regions), NeighbourDirection.East)); } - neighbours.remove(getGlobalRegion()); + neighbours.removeIf(data -> data.getKey().getType().isGlobal()); return neighbours.stream(); } - public Stream getNeighbours(Region region) { + public Stream> getNeighbours(Region region) { return getNeighbours(region, false, true, regionMap.values()) - .filter(DynamicRegion.class::isInstance) - .map(DynamicRegion.class::cast); + .filter(data -> data.getKey() instanceof DynamicRegion) + .map(data -> new Pair<>((DynamicRegion) data.getKey(), data.getValue())); } @Override @@ -175,7 +185,9 @@ public class DynamicRegionSystem implements RegionSystem { while (!current.isEmpty()) { Region r = current.removeFirst(); if (!connected.add(r)) continue; - getNeighbours(r, true, false, regions).forEach(current::add); + getNeighbours(r, true, false, regions) + .map(Pair::getKey) + .forEach(current::add); } return connected.stream(); diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/DynamicRegion.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/DynamicRegion.java index 2144a7e3..30e488d9 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/DynamicRegion.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/DynamicRegion.java @@ -19,21 +19,14 @@ package de.steamwar.bausystem.region.dynamic; -import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldedit.regions.CuboidRegion; -import com.sk89q.worldedit.world.block.BlockTypes; import de.steamwar.bausystem.region.DynamicRegionSystem; import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionData; import lombok.Getter; import lombok.NonNull; -import org.bukkit.Bukkit; import java.util.UUID; -import java.util.stream.Collectors; public abstract class DynamicRegion implements Region { @@ -55,7 +48,14 @@ public abstract class DynamicRegion implements Region { public abstract void init(); - public void update(DynamicRegion updateFrom) { + public final void updateNeighbours() { + DynamicRegionSystem.INSTANCE.getNeighbours(this) + .forEach(data -> { + data.getKey().update(this, data.getValue().opposite()); + }); + } + + public void update(DynamicRegion updateFrom, NeighbourDirection direction) { // TODO: Implement further } @@ -73,8 +73,7 @@ public abstract class DynamicRegion implements Region { Point maxPoint = getArea().getMaxPoint(false); PasteUtils.reset(minPoint, maxPoint); - DynamicRegionSystem.INSTANCE.getNeighbours(this).collect(Collectors.toList()) - .forEach(r -> r.update(this)); + this.updateNeighbours(); } @Override diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/NeighbourDirection.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/NeighbourDirection.java new file mode 100644 index 00000000..23c5a5d3 --- /dev/null +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/NeighbourDirection.java @@ -0,0 +1,59 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2026 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.bausystem.region.dynamic; + +import de.steamwar.bausystem.region.dynamic.path.PathCorner; +import de.steamwar.bausystem.region.dynamic.path.PathSide; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Set; + +@AllArgsConstructor +@Getter +public enum NeighbourDirection { + North(0, -1, Set.of(PathSide.North), Set.of(PathCorner.NorthEast, PathCorner.NorthWest)), + South(0, 1, Set.of(PathSide.South), Set.of(PathCorner.SouthEast, PathCorner.SouthWest)), + West(-1, 0, Set.of(PathSide.West), Set.of(PathCorner.NorthWest, PathCorner.SouthWest)), + East(1, 0, Set.of(PathSide.East), Set.of(PathCorner.NorthEast, PathCorner.SouthEast)), + NorthWest(-1, -1, Set.of(), Set.of(PathCorner.NorthWest)), + NorthEast(1, -1, Set.of(), Set.of(PathCorner.NorthEast)), + SouthWest(-1, 1, Set.of(), Set.of(PathCorner.SouthWest)), + SouthEast(1, 1, Set.of(), Set.of(PathCorner.SouthEast)), + ; + + private final int tileOffsetX; + private final int tileOffsetZ; + private final Set sideUpdates; + private final Set cornerUpdates; + + public NeighbourDirection opposite() { + return switch (this) { + case North -> South; + case South -> North; + case East -> West; + case West -> East; + case NorthWest -> SouthEast; + case NorthEast -> SouthWest; + case SouthWest -> NorthEast; + case SouthEast -> NorthWest; + }; + } +} diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/Tile.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/Tile.java index b3594eb6..68f77a35 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/Tile.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/Tile.java @@ -129,4 +129,9 @@ public class Tile { public long getId() { return getID(tileX, tileZ); } + + @Override + public String toString() { + return tileX + ":" + tileZ; + } } diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathArea.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathArea.java index 3e4cc9dc..285c5309 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathArea.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathArea.java @@ -30,7 +30,6 @@ import de.steamwar.bausystem.region.dynamic.VariantSelector; import de.steamwar.bausystem.shared.Pair; import de.steamwar.bausystem.utils.PasteBuilder; import lombok.NonNull; -import lombok.RequiredArgsConstructor; import org.bukkit.Bukkit; import org.jetbrains.annotations.Nullable; @@ -66,37 +65,6 @@ public class PathArea implements Region.Area { .Case(Path, Path, Global, CORNER_INNER_GLOBAL, RotationCorrection.UsingOrdinal) ; - @RequiredArgsConstructor - protected enum Side { - North(0, -1, 7, 0, 0), - South(0, 1, 7, 14, 180), - West(-1, 0, 0, 7, 90), - East(1, 0, 14, 7, 270), - ; - - private final int tileOffsetX; - private final int tileOffsetZ; - private final int pasteOffsetX; - private final int pasteOffsetZ; - private final int rotate; - } - - @RequiredArgsConstructor - protected enum Corner { - NorthEast(Side.North, Side.East, 14, 0, 0, -90), - NorthWest(Side.North, Side.West, 0, 0, 0, 90), - SouthWest(Side.South, Side.West, 0, 14, 180, -90), - SouthEast(Side.South, Side.East, 14, 14, 180, 90), - ; - - protected final Side side1; - protected final Side side2; - private final int pasteOffsetX; - private final int pasteOffsetZ; - private final int rotate; - private final int rotateCorrection; - } - protected enum RotationCorrection { Unchanged, WithCorrection, @@ -140,6 +108,45 @@ public class PathArea implements Region.Area { return null; // I know what I do! } + public void reset(PathSide side) { + File resetFile = null; + VariantSelector selector = SELECTOR_SIDE.Select(tile, side); + if (selector != null) resetFile = selector.select(regionIdentifier, side.ordinal() + side.rotate).orElse(null); + if (selector == null || resetFile == null) { + if (!BauSystem.DEV_SERVER) return; + resetFile = FALLBACK_SCHEM; + } + + PasteUtils.paste(resetFile, minPoint.add(side.pasteOffsetX, 0, side.pasteOffsetZ), side.rotate); + } + + public void reset(PathCorner corner) { + File resetFile = null; + Pair pair = SELECTOR_CORNER.Select(tile, corner); + VariantSelector selector = pair.getKey(); + RotationCorrection rotationCorrection = pair.getValue(); + if (selector != null) resetFile = selector.select(regionIdentifier, corner.side1.ordinal() * corner.side2.ordinal() + corner.side1.rotate * corner.side2.rotate).orElse(null); + if (selector == null || resetFile == null) { + if (!BauSystem.DEV_SERVER) return; + resetFile = FALLBACK_SCHEM; + rotationCorrection = RotationCorrection.Unchanged; + } + + int rotate = corner.rotate; + switch (rotationCorrection) { + case Unchanged: + break; + case UsingOrdinal: + rotate = corner.ordinal() * 90; + break; + case WithCorrection: + rotate += corner.rotateCorrection; + break; + } + + PasteUtils.paste(resetFile, minPoint.add(corner.pasteOffsetX, 0, corner.pasteOffsetZ), rotate); + } + @Override public void reset(PasteBuilder pasteBuilder, boolean extension) { if (region.isGarden()) { @@ -151,45 +158,16 @@ public class PathArea implements Region.Area { PasteUtils.paste(resetFile, minPoint.add(7, 0, 7), 0); } - for (Side side : Side.values()) { - VariantSelector selector = SELECTOR_SIDE.Select(tile, side); - if (selector != null) resetFile = selector.select(regionIdentifier, side.ordinal() + side.rotate).orElse(null); - if (selector == null || resetFile == null) { - if (!BauSystem.DEV_SERVER) continue; - resetFile = FALLBACK_SCHEM; - } - - PasteUtils.paste(resetFile, minPoint.add(side.pasteOffsetX, 0, side.pasteOffsetZ), side.rotate); + for (PathSide side : PathSide.values()) { + reset(side); } - for (Corner corner : Corner.values()) { - Pair pair = SELECTOR_CORNER.Select(tile, corner); - VariantSelector selector = pair.getKey(); - RotationCorrection rotationCorrection = pair.getValue(); - if (selector != null) resetFile = selector.select(regionIdentifier, corner.side1.ordinal() * corner.side2.ordinal() + corner.side1.rotate * corner.side2.rotate).orElse(null); - if (selector == null || resetFile == null) { - if (!BauSystem.DEV_SERVER) continue; - resetFile = FALLBACK_SCHEM; - rotationCorrection = RotationCorrection.Unchanged; - } - - int rotate = corner.rotate; - switch (rotationCorrection) { - case Unchanged: - break; - case UsingOrdinal: - rotate = corner.ordinal() * 90; - break; - case WithCorrection: - rotate += corner.rotateCorrection; - break; - } - - PasteUtils.paste(resetFile, minPoint.add(corner.pasteOffsetX, 0, corner.pasteOffsetZ), rotate); + for (PathCorner corner : PathCorner.values()) { + reset(corner); } } - protected static RegionType.ConnectionType getConnectionType(Tile tile, Side side, Side optionalSide) { + protected static RegionType.ConnectionType getConnectionType(Tile tile, PathSide side, PathSide optionalSide) { Optional optionalTile = tile.add(side.tileOffsetX, side.tileOffsetZ); if (optionalSide != null) { optionalTile = optionalTile.flatMap(t -> t.add(optionalSide.tileOffsetX, optionalSide.tileOffsetZ)); diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathCorner.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathCorner.java new file mode 100644 index 00000000..34d02bbd --- /dev/null +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathCorner.java @@ -0,0 +1,38 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2026 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.bausystem.region.dynamic.path; + +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +public enum PathCorner { + NorthEast(PathSide.North, PathSide.East, 14, 0, 0, -90), + NorthWest(PathSide.North, PathSide.West, 0, 0, 0, 90), + SouthWest(PathSide.South, PathSide.West, 0, 14, 180, -90), + SouthEast(PathSide.South, PathSide.East, 14, 14, 180, 90), + ; + + public final PathSide side1; + public final PathSide side2; + public final int pasteOffsetX; + public final int pasteOffsetZ; + public final int rotate; + public final int rotateCorrection; +} diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathRegion.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathRegion.java index d343b824..3235853a 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathRegion.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathRegion.java @@ -20,10 +20,7 @@ package de.steamwar.bausystem.region.dynamic.path; import de.steamwar.bausystem.region.*; -import de.steamwar.bausystem.region.dynamic.DynamicRegion; -import de.steamwar.bausystem.region.dynamic.DynamicRegionRepository; -import de.steamwar.bausystem.region.dynamic.RegionConstructorData; -import de.steamwar.bausystem.region.dynamic.Tile; +import de.steamwar.bausystem.region.dynamic.*; import de.steamwar.sql.GameModeConfig; import lombok.NonNull; import org.bukkit.Material; @@ -52,10 +49,14 @@ public class PathRegion extends DynamicRegion { } @Override - public void update(DynamicRegion updateFrom) { + public void update(DynamicRegion updateFrom, NeighbourDirection direction) { gardenCache = null; - // TODO: Improve - area.reset(null, false); + for (PathSide side : direction.getSideUpdates()) { + area.reset(side); + } + for (PathCorner corner : direction.getCornerUpdates()) { + area.reset(corner); + } } private Boolean gardenCache = null; diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathSide.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathSide.java new file mode 100644 index 00000000..7f73fb1b --- /dev/null +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/PathSide.java @@ -0,0 +1,37 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2026 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.bausystem.region.dynamic.path; + +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +public enum PathSide { + North(0, -1, 7, 0, 0), + South(0, 1, 7, 14, 180), + West(-1, 0, 0, 7, 90), + East(1, 0, 14, 7, 270), + ; + + public final int tileOffsetX; + public final int tileOffsetZ; + public final int pasteOffsetX; + public final int pasteOffsetZ; + public final int rotate; +} diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorCorner.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorCorner.java index 405f2e12..b374a99a 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorCorner.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorCorner.java @@ -58,7 +58,7 @@ class SelectorCorner { return this; } - public Pair Select(Tile tile, PathArea.Corner corner) { + public Pair Select(Tile tile, PathCorner corner) { RegionType.ConnectionType left = PathArea.getConnectionType(tile, corner.side1, null); RegionType.ConnectionType right = PathArea.getConnectionType(tile, corner.side2, null); RegionType.ConnectionType diagonal = PathArea.getConnectionType(tile, corner.side1, corner.side2); diff --git a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorSide.java b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorSide.java index 62237977..8d064ab4 100644 --- a/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorSide.java +++ b/BauSystem/BauSystem_RegionDynamic/src/de/steamwar/bausystem/region/dynamic/path/SelectorSide.java @@ -32,7 +32,7 @@ class SelectorSide { return this; } - public VariantSelector Select(Tile tile, PathArea.Side side) { + public VariantSelector Select(Tile tile, PathSide side) { RegionType.ConnectionType type = PathArea.getConnectionType(tile, side, null); return selectors[type.ordinal()]; }