修复Bmp2数值读取问题

This commit is contained in:
Light_Quanta 2025-01-26 09:37:53 +08:00
parent 8a887022b0
commit c668394659
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -74,8 +74,8 @@ public class Bmp2Entity extends ContainerMobileEntity implements GeoEntity, ICha
public static final EntityDataAccessor<Float> TRACK_L = SynchedEntityData.defineId(Bmp2Entity.class, EntityDataSerializers.FLOAT);
public static final EntityDataAccessor<Float> TRACK_R = SynchedEntityData.defineId(Bmp2Entity.class, EntityDataSerializers.FLOAT);
public static final float MAX_HEALTH = VehicleConfig.LAV_150_HP.get();
public static final int MAX_ENERGY = VehicleConfig.LAV_150_MAX_ENERGY.get();
public static final float MAX_HEALTH = VehicleConfig.BMP_2_HP.get();
public static final int MAX_ENERGY = VehicleConfig.BMP_2_MAX_ENERGY.get();
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public float turretYRot;
@ -444,7 +444,7 @@ public class Bmp2Entity extends ContainerMobileEntity implements GeoEntity, ICha
}
if (this.forwardInputDown || this.backInputDown) {
this.extraEnergy(VehicleConfig.SPEEDBOAT_ENERGY_COST.get());
this.extraEnergy(VehicleConfig.BMP_2_ENERGY_COST.get());
}
this.entityData.set(POWER, this.entityData.get(POWER) * (upInputDown ? 0.5f : (rightInputDown || leftInputDown) ? 0.947f : 0.96f));