diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java index 69530167f..c0fb25dea 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java @@ -492,10 +492,10 @@ public class Bmp2Entity extends ContainerMobileEntity implements GeoEntity, ICha * 撞掉莲叶和冰块 */ public void collideBlock() { - AABB aabb = AABB.ofSize(new Vec3(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ()), 3.6, 2.6, 3.6); + AABB aabb = getBoundingBox().inflate(0.1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); - if (blockstate.is(Blocks.LILY_PAD)) { + if (blockstate.is(Blocks.LILY_PAD) || blockstate.is(Blocks.CACTUS)) { this.level().destroyBlock(pos, true); } }); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java index 724300c33..3cbf2e3f9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java @@ -465,10 +465,10 @@ public class Lav150Entity extends ContainerMobileEntity implements GeoEntity, IC * 撞掉莲叶和冰块 */ public void collideBlock() { - AABB aabb = AABB.ofSize(new Vec3(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ()), 3.6, 2.6, 3.6); + AABB aabb = getBoundingBox().inflate(0.1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); - if (blockstate.is(Blocks.LILY_PAD)) { + if (blockstate.is(Blocks.LILY_PAD) || blockstate.is(Blocks.CACTUS)) { this.level().destroyBlock(pos, true); } });