Update Examples

This commit is contained in:
Halbear
2026-05-31 21:06:24 +01:00
parent 6dd92f5c16
commit 5dc13c2f42
3 changed files with 8 additions and 8 deletions
@@ -242,13 +242,7 @@ public class VehicleBaseEntity extends Entity {
CurrentPositionVector = getPositionVec();
super.tick();
Controller.PollInputs(GetByteArrayValue("INPUT_DATA"));
PhysicsTick();
float CurrentPropRotation = GetFloatDataValue("TARGET_PROPELLER_ROTATION");
float PropIncrementAmount = GetFloatDataValue("PROPELLER_ROTATION_SPEED");
SetFloatDataValue("TARGET_PROPELLER_ROTATION",(CurrentPropRotation + PropIncrementAmount) % 360);
SetFloatDataValue("PROPELLER_ROTATION",CurrentPropRotation);
SubClassTickUpdateEvent();
TickUpdateEvent();
if(this.world.isRemote()){
@@ -40,7 +40,10 @@ public class Aeroplane extends VehicleBaseEntity {
@Override
public void TickUpdateEvent(){
float CurrentPropRotation = GetFloatDataValue("TARGET_PROPELLER_ROTATION");
float PropIncrementAmount = GetFloatDataValue("PROPELLER_ROTATION_SPEED");
SetFloatDataValue("TARGET_PROPELLER_ROTATION",(CurrentPropRotation + PropIncrementAmount) % 360);
SetFloatDataValue("PROPELLER_ROTATION",CurrentPropRotation);
}
@Override
@@ -35,7 +35,10 @@ public class Airboat extends VehicleBaseEntity {
@Override
public void TickUpdateEvent(){
float CurrentPropRotation = GetFloatDataValue("TARGET_PROPELLER_ROTATION");
float PropIncrementAmount = GetFloatDataValue("PROPELLER_ROTATION_SPEED");
SetFloatDataValue("TARGET_PROPELLER_ROTATION",(CurrentPropRotation + PropIncrementAmount) % 360);
SetFloatDataValue("PROPELLER_ROTATION",CurrentPropRotation);
}
@Override