Fixed mechanical grid not adding new nodes
This commit is contained in:
parent
571f571d4d
commit
f90c513986
3 changed files with 7 additions and 5 deletions
|
@ -53,9 +53,8 @@ public class MechanicalNode extends EnergyNode
|
|||
@Override
|
||||
public void update(float deltaTime)
|
||||
{
|
||||
float acceleration = this.acceleration * deltaTime;
|
||||
power = getEnergy() / deltaTime;
|
||||
|
||||
|
||||
prevAngularVelocity = angularVelocity;
|
||||
|
||||
onUpdate();
|
||||
|
@ -71,6 +70,8 @@ public class MechanicalNode extends EnergyNode
|
|||
// TODO: Remove upon split.
|
||||
if (world() != null && !world().isRemote)
|
||||
{
|
||||
double acceleration = this.acceleration * deltaTime;
|
||||
System.out.println("UPDATED");
|
||||
/**
|
||||
* Loss energy
|
||||
*/
|
||||
|
|
|
@ -31,13 +31,13 @@ public abstract class Node<G extends IGrid> implements INode<G>
|
|||
getGrid().reconstruct();
|
||||
}
|
||||
|
||||
public void recache()
|
||||
// TODO: Fix this.
|
||||
public void split()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// TODO: Fix this.
|
||||
public void split()
|
||||
public void recache()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class NodeGrid<N extends INode> extends Grid<N> implements IUpdate
|
|||
{
|
||||
connectedNode.getGrid().getNodes().clear();
|
||||
connectedNode.setGrid(this);
|
||||
add((N) connectedNode);
|
||||
reconstructNode((N) connectedNode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue