Update Examples
This commit is contained in:
@@ -242,13 +242,7 @@ public class VehicleBaseEntity extends Entity {
|
|||||||
CurrentPositionVector = getPositionVec();
|
CurrentPositionVector = getPositionVec();
|
||||||
super.tick();
|
super.tick();
|
||||||
Controller.PollInputs(GetByteArrayValue("INPUT_DATA"));
|
Controller.PollInputs(GetByteArrayValue("INPUT_DATA"));
|
||||||
|
|
||||||
PhysicsTick();
|
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();
|
SubClassTickUpdateEvent();
|
||||||
TickUpdateEvent();
|
TickUpdateEvent();
|
||||||
if(this.world.isRemote()){
|
if(this.world.isRemote()){
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ public class Aeroplane extends VehicleBaseEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void TickUpdateEvent(){
|
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
|
@Override
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ public class Airboat extends VehicleBaseEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void TickUpdateEvent(){
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user