Add heat to REI

This commit is contained in:
drcrazy 2019-08-20 03:44:54 +03:00
parent 21d77a2d7d
commit fee7d69919
4 changed files with 26 additions and 0 deletions

View file

@ -28,6 +28,7 @@ import me.shedaniel.rei.api.RecipeDisplay;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import reborncore.common.crafting.ingredient.RebornIngredient;
import techreborn.api.recipe.recipes.BlastFurnaceRecipe;
import reborncore.common.crafting.RebornRecipe;
import java.util.List;
@ -40,17 +41,25 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
private List<List<ItemStack>> inputs;
private List<ItemStack> outputs;
private int energy = 0;
private int heat = 0;
public MachineRecipeDisplay(R recipe) {
this.recipe = recipe;
this.inputs = recipe.getRebornIngredients().stream().map(RebornIngredient::getPreviewStacks).collect(Collectors.toList());
this.outputs = recipe.getOutputs();
this.energy = recipe.getPower();
if (recipe instanceof BlastFurnaceRecipe) {
this.heat = ((BlastFurnaceRecipe) recipe).getHeat();
}
}
public int getEnergy() {
return energy;
}
public int getHeat() {
return heat;
}
@Override
public Optional<Identifier> getRecipeLocation() {