Some work on the wind turbine

This commit is contained in:
Calclavia 2014-01-30 20:25:26 +08:00
parent bc09bc6ca8
commit 62ce220dae
3 changed files with 10 additions and 5 deletions

View file

@ -65,7 +65,7 @@ public class MechanicalNetwork extends Network<IMechanicalNetwork, IMechanical>
{
IMechanical mechanical = it.next();
Object[] connections = mechanical.getConnections();
for (int i = 0; i < connections.length; i++)
{
ForgeDirection dir = ForgeDirection.getOrientation(i);

View file

@ -91,7 +91,7 @@ public abstract class PartMechanical extends JCuboidPart implements JNormalOcclu
public void checkClientUpdate()
{
if (Math.abs(prevAngularVelocity - angularVelocity) > 0.1f)
if (Math.abs(prevAngularVelocity - angularVelocity) > 0.05f)
{
prevAngularVelocity = angularVelocity;
markPacketUpdate = true;

View file

@ -25,6 +25,12 @@ import calclavia.lib.prefab.turbine.TileTurbine;
*/
public class TileWindTurbine extends TileTurbine implements IMechanical
{
public TileWindTurbine()
{
maxPower = 50;
torque = 50;
}
@Override
public void invalidate()
{
@ -42,8 +48,7 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
*/
if (getDirection().offsetY == 0)
{
power += getWindPower() * 10;
maxPower = 100;
power += getWindPower();
}
}
@ -170,7 +175,7 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
@Override
public boolean inverseRotation(ForgeDirection dir, IMechanical with)
{
return true;
return false;
}
@Override