From 479312da26714e8376a280059018a2ce77c67169 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Sat, 1 Feb 2025 20:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=AB=98=E6=A0=87=E6=9E=AA=E5=AF=BC?= =?UTF-8?q?=E5=BC=B9=E7=9A=84=E6=9C=BA=E5=8A=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/projectile/JavelinMissileEntity.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/JavelinMissileEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/JavelinMissileEntity.java index fb63f81a9..197b89ae2 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/JavelinMissileEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/JavelinMissileEntity.java @@ -211,7 +211,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo boolean dir = Math.sqrt(Math.pow(px - ex, 2) + Math.pow(pz - ez, 2)) < 30; Vec3 targetPos = new Vec3(this.entityData.get(TARGET_X), this.entityData.get(TARGET_Y) + (entity instanceof EnderDragon ? -3 : 0), this.entityData.get(TARGET_Z)); if (entity != null) { - Vec3 toVec = getEyePosition().vectorTo(targetPos).normalize(); + Vec3 toVec = getEyePosition().vectorTo(targetPos.add(entity.getDeltaMovement().scale(0.5))).normalize(); if (this.tickCount > 3) { if (entityData.get(TOP)) { if (!dir) { @@ -221,13 +221,13 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo } else { boolean lostTarget = this.getY() < entity.getY(); if (!lostTarget) { - setDeltaMovement(getDeltaMovement().add(toVec.scale(0.8)).scale(0.95)); + setDeltaMovement(getDeltaMovement().add(toVec.scale(1)).scale(0.87)); } } } else { boolean lostTarget = (VectorTool.calculateAngle(getDeltaMovement(), toVec) > 80); if (!lostTarget) { - setDeltaMovement(getDeltaMovement().add(toVec.scale(0.8)).scale(0.9)); + setDeltaMovement(getDeltaMovement().add(toVec.scale(1)).scale(0.87)); } } } @@ -257,11 +257,11 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo } // 控制速度 - if (this.getDeltaMovement().length() < 3) { + if (this.getDeltaMovement().length() < 2.6) { this.setDeltaMovement(this.getDeltaMovement().multiply(1.06, 1.06, 1.06)); } - if (this.getDeltaMovement().length() > 3.3) { + if (this.getDeltaMovement().length() > 2.9) { this.setDeltaMovement(this.getDeltaMovement().multiply(0.9, 0.9, 0.9)); }