use of logisticspipes.gui.popup.SneakyConfigurationPopup in project LogisticsPipes by RS485.
the class SneakyUpgradeConfigGuiProvider method getClientGui.
@Override
public Object getClientGui(EntityPlayer player) {
LogisticsTileGenericPipe bPipe = getTileAs(player.world, LogisticsTileGenericPipe.class);
if (!(bPipe.pipe instanceof CoreRoutedPipe)) {
return null;
}
List<DoubleCoordinates> list = new WorldCoordinatesWrapper(bPipe).connectedTileEntities().stream().filter(in -> SimpleServiceLocator.pipeInformationManager.isNotAPipe(in.getTileEntity())).map(in -> new DoubleCoordinates(in.getTileEntity())).collect(Collectors.toList());
if (list.isEmpty()) {
list = new WorldCoordinatesWrapper(bPipe).connectedTileEntities().stream().map(in -> new DoubleCoordinates(in.getTileEntity())).collect(Collectors.toList());
}
return new SneakyConfigurationPopup(list, getSlot(player, UpgradeSlot.class));
}
Aggregations