Update Examples
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user