AE2 First Commit, the dawn of 1.7 hast arrived.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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) {
|
||||
super( te, nbtName, inWorld );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<IGridNode> getMultiblockNodes()
|
||||
{
|
||||
if ( getCluster() == null )
|
||||
return new ChainedIterator<IGridNode>();
|
||||
|
||||
return new ProxyNodeIterator( getCluster().getTiles() );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user