mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-27 04:14:40 +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.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.block.BubbleColumnBlock;
|
||||||
import net.minecraft.block.FarmlandBlock;
|
import net.minecraft.block.FarmlandBlock;
|
||||||
import net.minecraft.block.FlowingFluidBlock;
|
import net.minecraft.block.FlowingFluidBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -72,10 +73,15 @@ public class PloughMovementBehaviour extends BlockBreakingMovementBehaviour {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBreak(World world, BlockPos breakingPos, BlockState state) {
|
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)
|
return state.getCollisionShape(world, breakingPos)
|
||||||
.isEmpty() && !(state.getBlock() instanceof FlowingFluidBlock)
|
.isEmpty();
|
||||||
&& !(world.getBlockState(breakingPos.down())
|
|
||||||
.getBlock() instanceof FarmlandBlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue