From 1d6e60ef013b2368bfda843c73be4e5a6c517eff Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Thu, 22 May 2025 15:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atsuishio/superbwarfare/entity/vehicle/A10Entity.java | 1 - .../atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java | 4 ++-- .../superbwarfare/entity/vehicle/Lav150Entity.java | 5 +++-- .../superbwarfare/entity/vehicle/PrismTankEntity.java | 4 ++-- .../superbwarfare/entity/vehicle/SpeedboatEntity.java | 2 +- .../superbwarfare/entity/vehicle/WheelChairEntity.java | 4 ++-- .../atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java | 2 +- .../entity/vehicle/base/MobileVehicleEntity.java | 6 +++--- src/main/resources/data/superbwarfare/vehicles/a_10a.json | 4 ++-- src/main/resources/data/superbwarfare/vehicles/ah_6.json | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java index 61c4b4863..7d3e4b763 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java @@ -70,7 +70,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity public static final EntityDataAccessor FIRE_TIME = SynchedEntityData.defineId(A10Entity.class, EntityDataSerializers.INT); public static final EntityDataAccessor TARGET_UUID = SynchedEntityData.defineId(A10Entity.class, EntityDataSerializers.STRING); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - private boolean gearUp; public int fireIndex; public int reloadCoolDownBomb; public int reloadCoolDownMissile; 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 abb32c260..42fccde63 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java @@ -196,9 +196,9 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit if (this.onGround()) { float f0 = 0.54f + 0.25f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90; this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.05 * getDeltaMovement().dot(getViewVector(1))))); - this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.85, f0)); + this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.99, f0)); } else { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.98, 0.95, 0.98)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, 0.99)); } if (this.isInWater()) { 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 39fb6c71f..80649d02a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java @@ -151,13 +151,14 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt if (this.onGround()) { float f0 = 0.54f + 0.25f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90; this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.05 * getDeltaMovement().dot(getViewVector(1))))); - this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.85, f0)); + this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.99, f0)); + } else if (this.isInWater()) { float f1 = 0.74f + 0.09f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90; this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.04 * getDeltaMovement().dot(getViewVector(1))))); this.setDeltaMovement(this.getDeltaMovement().multiply(f1, 0.85, f1)); } else { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.95, 0.99)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, 0.99)); } if (this.level() instanceof ServerLevel serverLevel && this.isInWater() && this.getDeltaMovement().length() > 0.1) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java index 3243e92ac..e4346c48c 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java @@ -174,13 +174,13 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo if (this.onGround()) { float f0 = 0.54f + 0.25f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90; this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.05 * getDeltaMovement().dot(getViewVector(1))))); - this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.85, f0)); + this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.99, f0)); } else if (this.isInWater()) { float f1 = 0.61f + 0.08f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90; this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.04 * getDeltaMovement().dot(getViewVector(1))))); this.setDeltaMovement(this.getDeltaMovement().multiply(f1, 0.85, f1)); } else { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.95, 0.99)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, 0.99)); } if (this.level() instanceof ServerLevel serverLevel && this.isInWater() && this.getDeltaMovement().length() > 0.1) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java index fdc93819d..7e2640c65 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java @@ -118,7 +118,7 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo this.setDeltaMovement(this.getDeltaMovement().add(0.0, fluidFloat, 0.0)); if (this.onGround()) { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.2, 0.85, 0.2)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.2, 0.99, 0.2)); } else if (isInWater()) { float f = (float) (0.75f - (0.04f * java.lang.Math.min(getSubmergedHeight(this), this.getBbHeight())) + 0.09f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90); this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.04 * getDeltaMovement().dot(getViewVector(1))))); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/WheelChairEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/WheelChairEntity.java index 06eec2109..e3e1048f2 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/WheelChairEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/WheelChairEntity.java @@ -99,9 +99,9 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity { super.baseTick(); if (this.onGround()) { float f = (float) Mth.clamp(0.85f + 0.05f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90, 0.01, 0.99); - this.setDeltaMovement(this.getDeltaMovement().multiply(f, 0.95, f)); + this.setDeltaMovement(this.getDeltaMovement().multiply(f, 0.99, f)); } else { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.95, 0.99)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, 0.99)); } this.setSprinting(this.getDeltaMovement().horizontalDistance() > 0.15); attractEntity(); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java index c8ecfd64b..fee262c86 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -289,7 +289,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).normalize().scale(0.05 * getDeltaMovement().dot(getViewVector(1))))); this.setDeltaMovement(this.getDeltaMovement().multiply(f0, 0.99, f0)); } else { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.98, 0.99, 0.98)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, 0.99)); } if (this.isInWater()) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java index bd4cc353e..2ba6cce42 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java @@ -686,14 +686,14 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements float v = (float) velocity.dot(position().vectorTo(entity.position())); var velAdd = position().vectorTo(entity.position()).normalize().scale(0.1 * v); - if (Mth.abs(v) > 0.1) { + if (Mth.abs(v) > 0.3) { if (!this.level().isClientSide) { this.level().playSound(null, this, ModSounds.VEHICLE_STRIKE.get(), this.getSoundSource(), 1, 1); } - entity.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (f1 * 8 * (Mth.abs(v) - 0.2))); + entity.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (f1 * 2 * (Mth.abs(v) - 0.3) * (Mth.abs(v) - 0.3))); if (entity instanceof VehicleEntity) { - this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), entity, entity.getFirstPassenger() == null ? entity : entity.getFirstPassenger()), (float) (f * 8 * (Mth.abs(v) - 0.2))); + this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), entity, entity.getFirstPassenger() == null ? entity : entity.getFirstPassenger()), (float) (f * (Mth.abs(v) - 0.3) * (Mth.abs(v) - 0.3))); } if (!(entity instanceof TargetEntity)) { diff --git a/src/main/resources/data/superbwarfare/vehicles/a_10a.json b/src/main/resources/data/superbwarfare/vehicles/a_10a.json index 037aead85..2c7efa788 100644 --- a/src/main/resources/data/superbwarfare/vehicles/a_10a.json +++ b/src/main/resources/data/superbwarfare/vehicles/a_10a.json @@ -3,7 +3,7 @@ "MaxHealth": 350, "MaxEnergy": 10000000, "UpStep": 0.5, - "Mass": 11.4, + "Mass": 20, "AllowFreeCam": true, "DamageModifiers": [ { @@ -78,7 +78,7 @@ }, { "Type": "Multiply", - "Value": 15, + "Value": 4, "Source": "superbwarfare:vehicle_strike" }, { diff --git a/src/main/resources/data/superbwarfare/vehicles/ah_6.json b/src/main/resources/data/superbwarfare/vehicles/ah_6.json index f3ddb4194..ac144bff6 100644 --- a/src/main/resources/data/superbwarfare/vehicles/ah_6.json +++ b/src/main/resources/data/superbwarfare/vehicles/ah_6.json @@ -63,7 +63,7 @@ }, { "Type": "Multiply", - "Value": 10, + "Value": 7, "Source": "superbwarfare:vehicle_strike" }, {