public abstract class IntegrationTableRecipe extends FlexibleRecipe<ItemStack> implements IIntegrationRecipe {
@Override
public final CraftingResult<ItemStack> craft(IFlexibleCrafter crafter, boolean preview) {
TileIntegrationTable table = (TileIntegrationTable) crafter;
ItemStack inputA;
ItemStack inputB;
if (preview) {
inputA = table.getStackInSlot(TileIntegrationTable.SLOT_INPUT_A);
inputB = table.getStackInSlot(TileIntegrationTable.SLOT_INPUT_B);
if (inputA != null) {
inputA = inputA.copy();
}
if (inputB != null) {
inputB = inputB.copy();
}
} else {
inputA = table.decrStackSize(TileIntegrationTable.SLOT_INPUT_A, 1);
inputB = table.decrStackSize(TileIntegrationTable.SLOT_INPUT_B, 1);
}
return craft(table, preview, inputA, inputB);
}