improved rei compat ()

This commit is contained in:
modmuss50 2020-03-05 19:24:29 +00:00 committed by GitHub
parent 3920ff79d9
commit a88d34b87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 19 deletions
src/main/java/techreborn/compat/rei

View file

@ -44,12 +44,14 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
private List<EntryStack> outputs;
private int energy = 0;
private int heat = 0;
private int time = 0;
private FluidInstance fluidInstance = null;
public MachineRecipeDisplay(R recipe) {
this.recipe = recipe;
this.inputs = CollectionUtils.map(recipe.getRebornIngredients(), ing -> CollectionUtils.map(ing.getPreviewStacks(), RebornEntryStack::create));
this.outputs = CollectionUtils.map(recipe.getOutputs(), RebornEntryStack::create);
this.time = recipe.getTime();
this.energy = recipe.getPower();
if (recipe instanceof BlastFurnaceRecipe) {
this.heat = ((BlastFurnaceRecipe) recipe).getHeat();
@ -73,6 +75,10 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
return heat;
}
public int getTime() {
return time;
}
public FluidInstance getFluidInstance() {
return fluidInstance;
}