Applied-Energistics-2-tiler.../me/helpers/AENetworkProxyMultiblock.java

33 lines
855 B
Java
Raw Normal View History

package appeng.me.helpers;
import java.util.Iterator;
import appeng.api.networking.IGridMultiblock;
import appeng.api.networking.IGridNode;
import appeng.me.cluster.IAECluster;
import appeng.me.cluster.IAEMultiBlock;
import appeng.util.iterators.ChainedIterator;
import appeng.util.iterators.ProxyNodeIterator;
public class AENetworkProxyMultiblock extends AENetworkProxy implements IGridMultiblock
{
IAECluster getCluster()
{
return ((IAEMultiBlock) getMachine()).getCluster();
}
public AENetworkProxyMultiblock(IGridProxyable te, String nbtName, boolean inWorld) {
2014-01-23 17:28:12 +01:00
super( te, nbtName, null, inWorld );
}
@Override
public Iterator<IGridNode> getMultiblockNodes()
{
if ( getCluster() == null )
return new ChainedIterator<IGridNode>();
return new ProxyNodeIterator( getCluster().getTiles() );
}
}