From f1a1c728e627fbf68eed69d38e415247a5040d47 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Thu, 30 Jan 2025 21:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9C=B0=E9=9D=A2=E8=BD=BD?= =?UTF-8?q?=E5=85=B7=E6=92=9E=E6=8E=89=E4=BB=99=E4=BA=BA=E6=8E=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java | 4 ++-- .../atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } });