mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 03:53:12 +01:00
Ploughing bubbles
- Fixed Mechanical Plough breaking segments of a bubble column
This commit is contained in:
parent
1b5f9e7944
commit
8fd4664ed8
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue