修复载具运动部件帧率低的问题

This commit is contained in:
Atsuihsio 2025-01-02 10:57:28 +08:00
parent 7b1654a593
commit e8a7cd05c9
2 changed files with 8 additions and 8 deletions

View file

@ -187,6 +187,11 @@ public class SpeedboatEntity extends MobileVehicleEntity implements GeoEntity, I
@Override
public void baseTick() {
turretYRotO = this.getTurretYRot();
turretXRotO = this.getTurretXRot();
rotorRotO = this.getRotorRot();
rudderRotO = this.getRudderRot();
super.baseTick();
if (this.entityData.get(HEAT) > 0) {
@ -205,11 +210,6 @@ public class SpeedboatEntity extends MobileVehicleEntity implements GeoEntity, I
this.entityData.set(AMMO, this.getItemStacks().stream().filter(stack -> stack.is(ModItems.HEAVY_AMMO.get())).mapToInt(ItemStack::getCount).sum());
}
turretYRotO = this.getTurretYRot();
turretXRotO = this.getTurretXRot();
rotorRotO = this.getRotorRot();
rudderRotO = this.getRudderRot();
Entity driver = this.getFirstPassenger();
if (driver instanceof Player player) {
if (this.entityData.get(HEAT) > 100) {

View file

@ -102,7 +102,8 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity {
@Override
public void baseTick() {
super.baseTick();
leftWheelRotO = this.getLeftWheelRot();
rightWheelRotO = this.getRightWheelRot();
if (jumpCoolDown > 0 && onGround()) {
jumpCoolDown--;
@ -112,8 +113,7 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity {
handBusyTime--;
}
leftWheelRotO = this.getLeftWheelRot();
rightWheelRotO = this.getRightWheelRot();
super.baseTick();
this.setDeltaMovement(this.getDeltaMovement().add(0.0, -0.048, 0.0));
if (this.onGround()) {