Noisy bugs

- Fixed contraption step sounds acting up again
- Fixed ploughs playing sounds when breaking air blocks
This commit is contained in:
simibubi 2022-04-06 16:46:04 +02:00
parent 3c87044dc5
commit 4571b347e4
2 changed files with 3 additions and 1 deletions

View file

@ -71,6 +71,8 @@ public class PloughMovementBehaviour extends BlockBreakingMovementBehaviour {
@Override @Override
public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) { public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) {
if (state.isAir())
return false;
if (world.getBlockState(breakingPos.below()) if (world.getBlockState(breakingPos.below())
.getBlock() instanceof FarmBlock) .getBlock() instanceof FarmBlock)
return false; return false;

View file

@ -87,7 +87,7 @@ public abstract class EntityContraptionInteractionMixin extends CapabilityProvid
} }
@Inject(at = @At(value = "JUMP", opcode = 154, // IFNE line 661 injecting before `!blockstate.isAir(this.world, blockpos)` @Inject(at = @At(value = "JUMP", opcode = 154, // IFNE line 661 injecting before `!blockstate.isAir(this.world, blockpos)`
ordinal = 5), method = "move") ordinal = 7), method = "move")
private void movementMixin(MoverType mover, Vec3 movement, CallbackInfo ci) { private void movementMixin(MoverType mover, Vec3 movement, CallbackInfo ci) {
Vec3 worldPos = self.position() Vec3 worldPos = self.position()
.add(0, -0.2, 0); .add(0, -0.2, 0);