From 8fd4664ed8668227bf86f503756ea966a8e559e2 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 3 Jul 2021 16:38:51 +0200 Subject: [PATCH] Ploughing bubbles - Fixed Mechanical Plough breaking segments of a bubble column --- .../components/actors/PloughMovementBehaviour.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PloughMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PloughMovementBehaviour.java index 98e628ab0..ce54f6c7d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PloughMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PloughMovementBehaviour.java @@ -8,6 +8,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.BubbleColumnBlock; import net.minecraft.block.FarmlandBlock; import net.minecraft.block.FlowingFluidBlock; import net.minecraft.item.ItemStack; @@ -72,10 +73,15 @@ public class PloughMovementBehaviour extends BlockBreakingMovementBehaviour { @Override public boolean canBreak(World world, BlockPos breakingPos, BlockState state) { + if (world.getBlockState(breakingPos.down()) + .getBlock() instanceof FarmlandBlock) + return false; + if (state.getBlock() instanceof FlowingFluidBlock) + return false; + if (state.getBlock() instanceof BubbleColumnBlock) + return false; return state.getCollisionShape(world, breakingPos) - .isEmpty() && !(state.getBlock() instanceof FlowingFluidBlock) - && !(world.getBlockState(breakingPos.down()) - .getBlock() instanceof FarmlandBlock); + .isEmpty(); } @Override