use of com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode in project Create by Creators-of-Create.
the class ChuteTileEntity method handleInput.
private void handleInput(IItemHandler inv, float startLocation) {
if (inv == null)
return;
Predicate<ItemStack> canAccept = this::canAcceptItem;
int count = getExtractionAmount();
ExtractionCountMode mode = getExtractionMode();
if (mode == ExtractionCountMode.UPTO || !ItemHelper.extract(inv, canAccept, mode, count, true).isEmpty()) {
ItemStack extracted = ItemHelper.extract(inv, canAccept, mode, count, false);
if (!extracted.isEmpty())
setItem(extracted, startLocation);
}
}
Aggregations