Tweaked electric turbine sound to player every 20 ticks (1 second) instead of 1.3 seconds.
This commit is contained in:
parent
6cb7904e30
commit
17a90ba782
2 changed files with 3 additions and 3 deletions
|
@ -41,11 +41,11 @@ public class TileElectricTurbine extends TileTurbine implements IBoilHandler
|
||||||
@Override
|
@Override
|
||||||
public void playSound()
|
public void playSound()
|
||||||
{
|
{
|
||||||
if (this.worldObj.getWorldTime() % (Atomic.SECOND_IN_TICKS * 1.3F) == 0)
|
if (this.worldObj.getWorldTime() % Atomic.SECOND_IN_TICKS == 0)
|
||||||
{
|
{
|
||||||
double maxVelocity = (getMaxPower() / torque) * 4;
|
double maxVelocity = (getMaxPower() / torque) * 4;
|
||||||
float percentage = angularVelocity * 4 / (float) maxVelocity;
|
float percentage = Math.max(angularVelocity * 4 / (float) maxVelocity, 1.0f);
|
||||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, Reference.PREFIX + "turbine", percentage, 1.0F);
|
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, Reference.PREFIX + "turbine", percentage, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue