Some work on the wind turbine
This commit is contained in:
parent
bc09bc6ca8
commit
62ce220dae
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue