diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java index 6b2bf4ee..2e76214f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java @@ -105,7 +105,7 @@ public class RegionCommand extends SWCommand { if (checkGlobalRegion(region, p)) return; try { - PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getArea().getResetFile())) + PasteBuilder pasteBuilder = new PasteBuilder() .ignoreAir(true) .color(region.getRegionData().get(Flag.COLOR).getWithDefault()); region.getArea().reset(pasteBuilder, false); @@ -127,7 +127,7 @@ public class RegionCommand extends SWCommand { } try { - PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.SchematicProvider(node)) + PasteBuilder pasteBuilder = new PasteBuilder(PasteBuilder.ClipboardProvider.schematic(node)) .ignoreAir(true) .color(region.getRegionData().get(Flag.COLOR).getWithDefault()); region.getArea().reset(pasteBuilder, false); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java index 5532710c..6c9bc82e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java @@ -79,12 +79,12 @@ public class RegionLib implements LuaLib { Loader loader = Loader.getLoader(player); table.set("loader", getter(() -> loader == null ? "OFF" : loader.getStage().name())); - table.set("copyPoint", getter(() -> toPos(region.get().getBuildArea().getCopyPoint()))); + table.set("copyPoint", getter(() -> toPos(region.get().getBuildArea().getCopyPoint(false)))); table.set("minPointBuild", getter(() -> toPos(region.get().getBuildArea().getMinPoint(false)))); table.set("maxPointBuild", getter(() -> toPos(region.get().getBuildArea().getMinPoint(false)))); table.set("minPointBuildExtension", getter(() -> toPos(region.get().getBuildArea().getMinPoint(true)))); table.set("maxPointBuildExtension", getter(() -> toPos(region.get().getBuildArea().getMinPoint(true)))); - table.set("testblockPoint", getter(() -> toPos(region.get().getTestblockArea().getCopyPoint()))); + table.set("testblockPoint", getter(() -> toPos(region.get().getTestblockArea().getCopyPoint(false)))); table.set("minPointTestblock", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(false)))); table.set("maxPointTestblock", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(false)))); table.set("minPointTestblockExtension", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(true)))); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java index 74425cb6..37bc03d0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java @@ -48,10 +48,18 @@ public class Point { return new Point(blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ()); } + public Point add(Point point) { + return add(point.x, point.y, point.z); + } + public Point add(int x, int y, int z) { return new Point(this.x + x, this.y + y, this.z + z); } + public Point subtract(Point point) { + return subtract(point.x, point.y, point.z); + } + public Point subtract(int x, int y, int z) { return new Point(this.x - x, this.y - y, this.z - z); } @@ -60,6 +68,18 @@ public class Point { return new Point(x / factor, y / factor, z / factor); } + public Point setX(int x) { + return new Point(x, this.y, this.z); + } + + public Point setY(int y) { + return new Point(this.x, y, this.z); + } + + public Point setZ(int z) { + return new Point(this.x, this.y, z); + } + public Location toLocation(World world) { return new Location(world, x, y, z); } diff --git a/BauSystem/BauSystem_RegionDynamic/build.gradle.kts b/BauSystem/BauSystem_RegionDynamic/build.gradle.kts index d94d9de5..39e9e700 100644 --- a/BauSystem/BauSystem_RegionDynamic/build.gradle.kts +++ b/BauSystem/BauSystem_RegionDynamic/build.gradle.kts @@ -25,11 +25,6 @@ tasks.compileJava { options.isWarnings = false } -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - dependencies { compileOnly(libs.classindex) annotationProcessor(libs.classindex) @@ -37,13 +32,13 @@ dependencies { compileOnly(project(":BauSystem:BauSystem_Main", "default")) compileOnly(project(":SpigotCore", "default")) - compileOnly(libs.spigotapi) + compileOnly(libs.paperapi) compileOnly(libs.axiom) compileOnly(libs.authlib) compileOnly(libs.viaapi) - compileOnly(libs.nms20) - compileOnly(libs.fawe18) + compileOnly(libs.nms) + compileOnly(libs.fawe) implementation(libs.luaj) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 53f6b7da..5de418b8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -166,7 +166,6 @@ include( "BauSystem", "BauSystem:BauSystem_Main", "BauSystem:BauSystem_RegionDynamic", - // "BauSystem:BauSystem_RegionDynamic2", "BauSystem:BauSystem_RegionFixed" )