From daa8c777d24790f91113f57d5dedeb1561f6ad4b Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Fri, 3 Jan 2025 02:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E6=B7=BB=E5=8A=A0=E4=B9=98?= =?UTF-8?q?=E5=AE=A2=E8=A7=86=E8=A7=92=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/atsuishio/superbwarfare/entity/Ah6Entity.java | 9 +++++++++ .../atsuishio/superbwarfare/entity/SpeedboatEntity.java | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java index 62fb54a25..16da0506d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java @@ -217,7 +217,16 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico entity.setYBodyRot(this.getYRot()); float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot()); + + int i = this.getPassengers().indexOf(entity); + float f3 = Mth.clamp(f2, -80.0F, 80.0F); + if (i == 2) { + f3 = Mth.clamp(f2, -160.0F, -20.0F); + } + if (i == 3) { + f3 = Mth.clamp(f2, 20.0F, 160.0F); + } entity.yRotO += f3 - f2; entity.setYRot(entity.getYRot() + f3 - f2); entity.setYHeadRot(entity.getYRot()); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java index 29e982dcd..751ac2bf5 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java @@ -322,7 +322,6 @@ public class SpeedboatEntity extends MobileVehicleEntity implements GeoEntity, I } } - Level level = player.level(); final Vec3 center = new Vec3(this.getX(), this.getEyeY(), this.getZ());