Signing off with some incomplete attempt on mechanical multithreading

This commit is contained in:
Calclavia 2014-03-04 23:03:47 +08:00
parent 26007d60aa
commit 571f571d4d
4 changed files with 6 additions and 5 deletions

View file

@ -286,7 +286,6 @@ public class PartMultimeter extends PartFace implements IConnector<MultimeterNet
{
getNetwork().torqueGraph.queue(instance.getTorque());
getNetwork().angularVelocityGraph.queue(instance.getAngularVelocity());
System.out.println(instance.getPower());
getNetwork().powerGraph.queue((long) instance.getPower());
}
}

View file

@ -365,6 +365,7 @@ public class PartGear extends PartMechanical implements IMultiBlockStructure<Par
{
if (!world().isRemote)
System.out.println(node.getGrid());
if (itemStack != null && itemStack.getItem() instanceof ItemHandCrank)
{
if (!world().isRemote && ControlKeyModifer.isControlDown(player))

View file

@ -68,14 +68,14 @@ public class MechanicalNode extends EnergyNode
angle = angle % (Math.PI * 2);
}
//TODO: Remove upon split.
// TODO: Remove upon split.
if (world() != null && !world().isRemote)
{
/**
* Loss energy
*/
torque -= torque * getTorqueLoad() * deltaTime;
angularVelocity -= angularVelocity * getAngularVelocityLoad() * deltaTime;
torque -= getTorque() * getTorqueLoad() * deltaTime;
angularVelocity -= getAngularVelocity() * getAngularVelocityLoad() * deltaTime;
synchronized (connections)
{
@ -105,7 +105,7 @@ public class MechanicalNode extends EnergyNode
/**
* Set all current rotations
*/
adjacentMech.angle = Math.abs(angle) * (adjacentMech.angle >= 0 ? 1 : -1);
// adjacentMech.angle = Math.abs(angle) * (adjacentMech.angle >= 0 ? 1 : -1);
}
}
}

View file

@ -36,6 +36,7 @@ public abstract class Node<G extends IGrid> implements INode<G>
}
// TODO: Fix this.
public void split()
{