Some turbine fixes and tweaks
This commit is contained in:
parent
dcfdb7ad03
commit
82e03d45fd
3 changed files with 16 additions and 32 deletions
|
@ -64,13 +64,13 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
{
|
||||
if (angularVelocity > 0)
|
||||
{
|
||||
torque += 10;
|
||||
angularVelocity += 0.1f;
|
||||
torque += 1;
|
||||
angularVelocity += 0.01f;
|
||||
}
|
||||
else
|
||||
{
|
||||
torque -= 10;
|
||||
angularVelocity -= 0.1f;
|
||||
torque -= 1;
|
||||
angularVelocity -= 0.01f;
|
||||
}
|
||||
|
||||
manualCrankTime--;
|
||||
|
|
|
@ -25,8 +25,8 @@ public class TileWaterTurbine extends TileTurbine implements IMechanical
|
|||
{
|
||||
public TileWaterTurbine()
|
||||
{
|
||||
maxPower = 800;
|
||||
torque = 500;
|
||||
maxPower = 300;
|
||||
torque = defaultTorque;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,11 +25,6 @@ import calclavia.lib.prefab.turbine.TileTurbine;
|
|||
*/
|
||||
public class TileWindTurbine extends TileTurbine implements IMechanical
|
||||
{
|
||||
public TileWindTurbine()
|
||||
{
|
||||
maxPower = 500;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
@ -45,13 +40,18 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
|
|||
*/
|
||||
if (getDirection().offsetY == 0)
|
||||
{
|
||||
maxPower = 100;
|
||||
getMultiBlock().get().power += getWindPower();
|
||||
}
|
||||
else
|
||||
{
|
||||
maxPower = 1000;
|
||||
}
|
||||
|
||||
if (!getMultiBlock().isConstructed())
|
||||
torque = defaultTorque / 10;
|
||||
torque = defaultTorque / 6;
|
||||
else
|
||||
torque = defaultTorque;
|
||||
torque = defaultTorque / 2;
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
@ -66,13 +66,11 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
|
|||
{
|
||||
BiomeGenBase biome = worldObj.getBiomeGenForCoords(xCoord, zCoord);
|
||||
boolean hasBonus = biome instanceof BiomeGenOcean || biome instanceof BiomeGenPlains || biome == BiomeGenBase.river;
|
||||
return (long) ((worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / 256) * 200 : 0) + (hasBonus ? 80 : 0)) * (worldObj.isRaining() ? 2 : 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProduce()
|
||||
{
|
||||
if (!worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord))
|
||||
return 0;
|
||||
|
||||
return (long) (((((float) yCoord + 4) / 256) * maxPower) + (hasBonus ? 80 : 0)) * (worldObj.isRaining() ? 2 : 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,20 +84,6 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
return ResonantInduction.PACKET_TILE.getPacket(this, (byte) 1, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendPowerUpdate()
|
||||
{
|
||||
PacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, (byte) 2, angularVelocity), this.worldObj, new Vector3(this), 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mechanical Methods
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue