From 891f4b0e9cf9ecf370d62f19fe33a136ed054afd Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 28 Nov 2024 17:03:34 +0100 Subject: [PATCH] Fix Schematic submission in 1.12 --- .../autocheck/AutoCheckerResult.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java index 6a708bdf..a7d13f17 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java @@ -19,6 +19,7 @@ package de.steamwar.schematicsystem.autocheck; +import de.steamwar.core.Core; import de.steamwar.schematicsystem.CheckSchemType; import de.steamwar.schematicsystem.SchematicSystem; import lombok.Builder; @@ -143,13 +144,15 @@ public class AutoCheckerResult { blockScanResult.getDefunctNbt().forEach(blockVector3 -> { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_DEFUNCT_NBT", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(blockVector3), blockVector3.getX(), blockVector3.getY(), blockVector3.getZ()); }); - blockScanResult.getDesignBlocks().forEach((material, poss) -> { - if(material.getBlastResistance() > type.getMaxBlastResistance()) { - poss.forEach(pos -> { - SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_DESIGN_BLOCK", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(pos), material.name(), pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()); - }); - } - }); + if(Core.getVersion() > 12) { + blockScanResult.getDesignBlocks().forEach((material, poss) -> { + if(material.getBlastResistance() > type.getMaxBlastResistance()) { + poss.forEach(pos -> { + SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_DESIGN_BLOCK", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(pos), material.name(), pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()); + }); + } + }); + } entities.forEach(blockPos -> { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_ENTITY", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(blockPos), blockPos.getX(), blockPos.getY(), blockPos.getZ()); });