From 041cd296e0da8cbc5f5fad5b99c1726a7b81f93b Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Fri, 21 Mar 2025 02:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DC4=E6=9C=9D=E5=8C=97=E5=90=B8?= =?UTF-8?q?=E9=99=84=E6=97=B6=E8=A7=92=E5=BA=A6=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java index 8dda21114..13a84fc9d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java @@ -40,7 +40,6 @@ import software.bernie.geckolib.util.GeckoLibUtil; import javax.annotation.Nullable; -// TODO 修复朝北吸附时角度不正确的问题 public class C4Entity extends Projectile implements GeoEntity { protected static final EntityDataAccessor LAST_ATTACKER_UUID = SynchedEntityData.defineId(C4Entity.class, EntityDataSerializers.STRING); @@ -161,7 +160,7 @@ public class C4Entity extends Projectile implements GeoEntity { } Vec3 motion = this.getDeltaMovement(); - if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + if (this.xRotO == 0.0F && this.yRotO == 0.0F && !this.inGround) { double d0 = motion.horizontalDistance(); this.setYRot((float) (Mth.atan2(motion.x, motion.z) * (double) (180F / (float) Math.PI))); this.setXRot((float) (Mth.atan2(motion.y, d0) * (double) (180F / (float) Math.PI)));