use of gregtech.api.recipes.recipes.CokeOvenRecipe in project GregTech by GregTechCE.
the class MetaTileEntityCokeOven method tryPickNewRecipe.
private boolean tryPickNewRecipe() {
ItemStack inputStack = importItems.getStackInSlot(0);
if (inputStack.isEmpty()) {
return false;
}
CokeOvenRecipe currentRecipe = getOrRefreshRecipe(inputStack);
if (currentRecipe != null && setupRecipe(inputStack, currentRecipe)) {
inputStack.shrink(currentRecipe.getInput().getCount());
this.maxProgressDuration = currentRecipe.getDuration();
this.currentProgress = 0;
this.outputStack = currentRecipe.getOutput().copy();
this.outputFluid = currentRecipe.getFluidOutput().copy();
markDirty();
return true;
}
return false;
}
use of gregtech.api.recipes.recipes.CokeOvenRecipe in project GregTech by GregTechCE.
the class CokeOvenRecipeBuilder method buildAndRegister.
@ZenMethod
public void buildAndRegister() {
ValidationResult<CokeOvenRecipe> result = build();
if (result.getType() == EnumValidationResult.VALID) {
CokeOvenRecipe recipe = result.getResult();
RecipeMaps.COKE_OVEN_RECIPES.add(recipe);
}
}
Aggregations