mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and the large turbine
This commit is contained in:
parent
4bd1ccddf2
commit
8dfe52b895
@ -33,6 +33,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
private boolean shouldTurn;
|
private boolean shouldTurn;
|
||||||
public float rotor;
|
public float rotor;
|
||||||
public float lastRotor;
|
public float lastRotor;
|
||||||
|
public float fanAcceleration = 0F;
|
||||||
|
|
||||||
public TileEntityMachineLargeTurbine() {
|
public TileEntityMachineLargeTurbine() {
|
||||||
super(7);
|
super(7);
|
||||||
@ -104,17 +105,20 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
data.setBoolean("operational", operational);
|
data.setBoolean("operational", operational);
|
||||||
this.networkPack(data, 50);
|
this.networkPack(data, 50);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.lastRotor = this.rotor;
|
this.lastRotor = this.rotor;
|
||||||
|
this.rotor += this.fanAcceleration;
|
||||||
|
|
||||||
|
if(this.rotor >= 360) {
|
||||||
|
this.rotor -= 360;
|
||||||
|
this.lastRotor -= 360;
|
||||||
|
}
|
||||||
|
|
||||||
if(shouldTurn) {
|
if(shouldTurn) {
|
||||||
|
|
||||||
this.rotor += 15F;
|
this.fanAcceleration = Math.max(0F, Math.min(15F, this.fanAcceleration += 0.1F));
|
||||||
|
}
|
||||||
if(this.rotor >= 360) {
|
if(!shouldTurn) {
|
||||||
this.rotor -= 360;
|
this.fanAcceleration = Math.max(0F, Math.min(15F, this.fanAcceleration -= 0.1F));
|
||||||
this.lastRotor -= 360;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user