use of cofh.thermalexpansion.block.ender.TileTesseract in project LogisticsPipes by RS485.
the class ThermalExpansionProxy method getConnectedTesseracts.
@Override
public List<TileEntity> getConnectedTesseracts(TileEntity tile) {
EnderRegistry registry = RegistryEnderAttuned.getRegistry();
List<TileEntity> validOutputs = new LinkedList<>();
if (registry == null)
return validOutputs;
List<IEnderItemHandler> interfaces = registry.getLinkedItemOutputs((TileTesseract) tile);
if (interfaces == null) {
return validOutputs;
}
validOutputs.addAll(interfaces.stream().filter(object -> object.canReceiveItems() && object.canSendItems() && object instanceof TileEntity).map(object -> (TileEntity) object).collect(Collectors.toList()));
return validOutputs;
}
Aggregations