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(); IMechanical mechanical = it.next();
Object[] connections = mechanical.getConnections(); Object[] connections = mechanical.getConnections();
for (int i = 0; i < connections.length; i++) for (int i = 0; i < connections.length; i++)
{ {
ForgeDirection dir = ForgeDirection.getOrientation(i); ForgeDirection dir = ForgeDirection.getOrientation(i);

View file

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

View file

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