Fix MWGDisplayRegion, WG45DisplayRegion, WS175DisplayRegion, WS175PlotRegion
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
Fix AreaBlock.create
This commit is contained in:
@@ -58,7 +58,7 @@ public class AreaBlock implements Region.Area {
|
||||
|
||||
int tempSizeZ = switch (copyLocation) {
|
||||
case CENTER -> size.getZ() * 2 + distance;
|
||||
case SIDE -> size.getZ() + distance - 1;
|
||||
case SIDE -> size.getZ() + distance;
|
||||
};
|
||||
|
||||
// Calculate Offset Region to North
|
||||
@@ -81,7 +81,10 @@ public class AreaBlock implements Region.Area {
|
||||
|
||||
// Calculate Offset North to South
|
||||
minOffsetZ += distance;
|
||||
if (copyLocation == CopyLocation.CENTER) minOffsetZ += size.getZ();
|
||||
switch (copyLocation) {
|
||||
case CENTER -> minOffsetZ += size.getZ();
|
||||
case SIDE -> minOffsetZ -= 1;
|
||||
}
|
||||
|
||||
// Calculate South Points
|
||||
Point southMinPoint = regionMinPoint.add(minOffsetX, yOffset, minOffsetZ);
|
||||
|
||||
@@ -44,7 +44,7 @@ import java.util.UUID;
|
||||
public class MWGDisplayRegion extends DynamicRegion {
|
||||
|
||||
protected static final int TILE_X = 3;
|
||||
protected static final int TILE_Z = 2;
|
||||
protected static final int TILE_Z = 3;
|
||||
|
||||
private static final File DIRECTORY = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "sections/miniwargear/display");
|
||||
private static final VariantSelector SELECTOR = VariantSelector.Get(DIRECTORY);
|
||||
|
||||
@@ -44,7 +44,7 @@ import java.util.UUID;
|
||||
public class WG45DisplayRegion extends DynamicRegion {
|
||||
|
||||
protected static final int TILE_X = 5;
|
||||
protected static final int TILE_Z = 4;
|
||||
protected static final int TILE_Z = 5;
|
||||
|
||||
private static final File DIRECTORY = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "sections/wargear_45/display");
|
||||
private static final VariantSelector SELECTOR = VariantSelector.Get(DIRECTORY);
|
||||
|
||||
@@ -43,8 +43,7 @@ import java.util.UUID;
|
||||
)
|
||||
public class WS175DisplayRegion extends DynamicRegion {
|
||||
|
||||
// TODO: X +/- 1
|
||||
protected static final int TILE_X = 10;
|
||||
protected static final int TILE_X = 11;
|
||||
protected static final int TILE_Z = 3;
|
||||
|
||||
private static final File DIRECTORY = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "sections/warship_175/display");
|
||||
|
||||
@@ -44,9 +44,8 @@ import java.util.UUID;
|
||||
)
|
||||
public class WS175PlotRegion extends DynamicRegion {
|
||||
|
||||
// TODO: X +/- 1
|
||||
protected static final int TILE_X = 10;
|
||||
protected static final int TILE_Z = 9;
|
||||
protected static final int TILE_X = 11;
|
||||
protected static final int TILE_Z = 10;
|
||||
|
||||
private static final File DIRECTORY = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "sections/warship_175/plot");
|
||||
private static final VariantSelector REGION = VariantSelector.Get(new File(DIRECTORY, "region"));
|
||||
@@ -64,7 +63,7 @@ public class WS175PlotRegion extends DynamicRegion {
|
||||
Tile tile = Tile.fromXZ(minX, minZ).orElseThrow();
|
||||
area = new AreaTile(tile, TILE_X, TILE_Z, this, REGION);
|
||||
|
||||
Pair<AreaBlock, AreaBlock> pair = AreaBlock.create(this, 36, new Point(175, 58, 39), new Point(0, 0, 0), new Point(0, 0, 0), AreaBlock.CopyLocation.SIDE, 132);
|
||||
Pair<AreaBlock, AreaBlock> pair = AreaBlock.create(this, 36, new Point(175, 58, 39), new Point(12, 0, 8), new Point(12, 0, 8), AreaBlock.CopyLocation.SIDE, 132);
|
||||
northArea = pair.getKey();
|
||||
southArea = pair.getValue();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user