From 5c8b70fc128f90b11fc5c3f4b08de7287bfaafee Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sat, 4 Feb 2023 12:15:45 +0100 Subject: [PATCH] added check if it actually is a tb --- .../bausystem/features/region/TestblockCommand.java | 2 +- BauSystem_Main/src/de/steamwar/bausystem/region/Region.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java index 8527371d..2db16400 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java @@ -57,7 +57,7 @@ public class TestblockCommand extends SWCommand { Region region = regionCheck(p); if (region == null) return; try { - region.reset(RegionType.TESTBLOCK, regionExtensionType); + region.reset(RegionType.TESTBLOCK, regionExtensionType, true); RegionUtils.message(region, "REGION_TB_DONE"); } catch (IOException e) { BauSystem.MESSAGE.send("REGION_TB_ERROR", p); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index 2b518c87..e2787034 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -421,8 +421,8 @@ public class Region { reset(schematic, regionType, RegionExtensionType.NORMAL, false); } - public void reset(RegionType regionType, RegionExtensionType regionExtensionType) throws IOException { - reset(null, regionType, regionExtensionType, false); + public void reset(RegionType regionType, RegionExtensionType regionExtensionType, boolean isTestBlock) throws IOException { + reset(null, regionType, regionExtensionType, isTestBlock); } public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean isTestBlock) throws IOException { @@ -430,7 +430,7 @@ public class Region { } public void reset(File file) { - EditSession editSession = paste(file, minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2), new PasteOptions(false, false, Color.YELLOW, false, false, getMinPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), getMaxPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), waterLevel)); + EditSession editSession = paste(file, minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2), new PasteOptions(false, false, Color.YELLOW, false, false, getMinPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), getMaxPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), waterLevel, false)); initSessions(); undoSessions.push(editSession); }