Fix Schematic submission in 1.12

This commit is contained in:
Lixfel
2024-11-28 17:03:34 +01:00
parent e71a704d25
commit 891f4b0e9c
@@ -19,6 +19,7 @@
package de.steamwar.schematicsystem.autocheck; package de.steamwar.schematicsystem.autocheck;
import de.steamwar.core.Core;
import de.steamwar.schematicsystem.CheckSchemType; import de.steamwar.schematicsystem.CheckSchemType;
import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.SchematicSystem;
import lombok.Builder; import lombok.Builder;
@@ -143,13 +144,15 @@ public class AutoCheckerResult {
blockScanResult.getDefunctNbt().forEach(blockVector3 -> { 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()); 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(Core.getVersion() > 12) {
if(material.getBlastResistance() > type.getMaxBlastResistance()) { blockScanResult.getDesignBlocks().forEach((material, poss) -> {
poss.forEach(pos -> { if(material.getBlastResistance() > type.getMaxBlastResistance()) {
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()); 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 -> { 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()); 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());
}); });