Fixed packets being sent client side, attempted to fix a multiblock connection issue with turbines

This commit is contained in:
Robert S 2014-06-09 08:37:32 -04:00
parent 6c67feb482
commit bd6aa3453e
2 changed files with 7 additions and 4 deletions

View file

@ -56,12 +56,15 @@ public abstract class TileMechanical extends TileBase implements INodeProvider,
{ {
super.updateEntity(); super.updateEntity();
mechanicalNode.update(); mechanicalNode.update();
if (!this.getWorldObj().isRemote)
{
if (mechanicalNode.markRotationUpdate && ticks % 10 == 0) if (mechanicalNode.markRotationUpdate && ticks % 10 == 0)
{ {
sendRotationPacket(); sendRotationPacket();
mechanicalNode.markRotationUpdate = false; mechanicalNode.markRotationUpdate = false;
} }
} }
}
@Override @Override
public INode getNode(Class<? extends INode> nodeType, ForgeDirection from) public INode getNode(Class<? extends INode> nodeType, ForgeDirection from)

View file

@ -22,7 +22,7 @@ public class TurbineNode extends MechanicalNode
@Override @Override
public boolean canConnect(ForgeDirection from, Object source) public boolean canConnect(ForgeDirection from, Object source)
{ {
return source instanceof MechanicalNode && !(source instanceof TurbineNode) && from == turbine().getDirection().getOpposite(); return turbine().getMultiBlock().isPrimary() && source instanceof MechanicalNode && !(source instanceof TurbineNode) && from == turbine().getDirection().getOpposite();
} }
@Override @Override