From bfc8c3e3068a8e84da22b9c1d826ff7524a451a7 Mon Sep 17 00:00:00 2001 From: reidbhuntley Date: Sat, 22 May 2021 17:35:49 -0400 Subject: [PATCH] Make gantry carriage brittle, defer brittle blocks --- src/main/java/com/simibubi/create/AllBlocks.java | 1 + .../content/schematics/block/SchematicannonTileEntity.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 5ea72cd61..5b572ea89 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -739,6 +739,7 @@ public class AllBlocks { public static final BlockEntry GANTRY_CARRIAGE = REGISTRATE.block("gantry_carriage", GantryCarriageBlock::new) .initialProperties(SharedProperties::stone) + .tag(AllBlockTags.BRITTLE.tag) .properties(Block.Properties::nonOpaque) .blockstate(BlockStateGen.directionalAxisBlockProvider()) .item() diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java index ef443d62d..2bc098dc3 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java @@ -11,6 +11,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllTags.AllBlockTags; +import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementTraits; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltPart; import com.simibubi.create.content.contraptions.relays.belt.BeltSlope; @@ -728,8 +729,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC } public static boolean shouldDeferBlock(BlockState state) { - Block block = state.getBlock(); - return block instanceof AbstractRailBlock || block.is(AllBlocks.GANTRY_CARRIAGE.get()); + return BlockMovementTraits.isBrittle(state); } public void finishedPrinting() {