Skip to content

Commit

Permalink
Merge branch 'mc1.18/dev' into mc1.19/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
simibubi committed Sep 21, 2023
2 parents 52efa49 + 2e1bcdb commit da9f15c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.BlockHelper;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Pair;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.infrastructure.config.AllConfigs;
Expand Down Expand Up @@ -101,6 +102,11 @@ protected float getBlockBreakingSpeed(MovementContext context) {

@Override
public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) {
for (Direction side : Iterate.directions)
if (world.getBlockState(breakingPos.relative(side))
.is(BlockTags.PORTALS))
return false;

return super.canBreak(world, breakingPos, state) && !state.getCollisionShape(world, breakingPos)
.isEmpty() && !AllBlocks.TRACK.has(state);
}
Expand Down

0 comments on commit da9f15c

Please sign in to comment.