From a08c31c8b42a835c44d81a8dd66560559c38a4f7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 3 Apr 2021 17:13:51 +0200 Subject: [PATCH] Add Region.Prototype.waterLevel --- .../de/steamwar/bausystem/world/Region.java | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index 02caaf8..a256e53 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -28,6 +28,9 @@ import de.steamwar.sql.NoClipboardException; import de.steamwar.sql.Schematic; import java.awt.*; import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.configuration.ConfigurationSection; @@ -320,6 +323,8 @@ public class Region { private final int extensionAxisX; private final boolean extensionPrototypeArea; + private final int waterLevel; + private final String schematic; private final boolean rotate; @@ -344,6 +349,7 @@ public class Region { extensionArea = true; } extensionPrototypeArea = extensionNegativeZ != 0 || extensionPositiveZ != 0 || extensionPositiveY != 0 || extensionAxisX != 0; + waterLevel = config.getInt("waterLevel", 0); rotate = config.getBoolean("rotate", false); ConfigurationSection testblockSection = config.getConfigurationSection("testblock"); @@ -436,32 +442,16 @@ public class Region { } } + @Getter + @AllArgsConstructor public static class Point { final int x; final int y; final int z; - public Point(int x, int y, int z) { - this.x = x; - this.y = y; - this.z = z; - } - public BlockVector3 toBlockVector3() { return BlockVector3.at(this.x, this.y, this.z); } - - public int getX() { - return this.x; - } - - public int getY() { - return this.y; - } - - public int getZ() { - return this.z; - } } }