2013-12-27 23:59:59 +01:00
|
|
|
package appeng.me.helpers;
|
|
|
|
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
2014-03-07 05:30:59 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2013-12-27 23:59:59 +01:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2014-03-07 05:30:59 +01:00
|
|
|
public AENetworkProxyMultiblock(IGridProxyable te, String nbtName, ItemStack itemStack, boolean inWorld) {
|
|
|
|
super( te, nbtName, itemStack, inWorld );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Iterator<IGridNode> getMultiblockNodes()
|
|
|
|
{
|
|
|
|
if ( getCluster() == null )
|
|
|
|
return new ChainedIterator<IGridNode>();
|
|
|
|
|
|
|
|
return new ProxyNodeIterator( getCluster().getTiles() );
|
|
|
|
}
|
|
|
|
}
|