use of com.almuradev.almura.feature.exchange.client.gui.ExchangeOfferScreen in project Almura by AlmuraDev.
the class ClientExchangeManager method handleExchangeSpecificOffer.
public void handleExchangeSpecificOffer(final String id) {
checkNotNull(id);
final GuiScreen currentScreen = Minecraft.getMinecraft().currentScreen;
if (!(currentScreen instanceof ExchangeScreen)) {
return;
}
final Exchange axs = this.getExchange(id);
if (axs == null) {
((ExchangeScreen) currentScreen).close();
return;
}
final ExchangeScreen axsScreen = (ExchangeScreen) currentScreen;
new ExchangeOfferScreen(axsScreen, axs, axsScreen.listItemList.getItems().stream().filter(item -> !item.getForSaleItem().isPresent()).map(item -> new BasicVanillaStack(item.asRealStack())).collect(Collectors.toList()), axsScreen.limit).display();
}
Aggregations