调整数值
This commit is contained in:
parent
15cbe7e447
commit
1d6e60ef01
10 changed files with 17 additions and 17 deletions
|
@ -70,7 +70,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
|||
public static final EntityDataAccessor<Integer> FIRE_TIME = SynchedEntityData.defineId(A10Entity.class, EntityDataSerializers.INT);
|
||||
public static final EntityDataAccessor<String> 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;
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)))));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
},
|
||||
{
|
||||
"Type": "Multiply",
|
||||
"Value": 10,
|
||||
"Value": 7,
|
||||
"Source": "superbwarfare:vehicle_strike"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue