Slightly better REI fluid handling. (#1968)

- now you can jump between fluid/cells/buckets when looking for recipes
This commit is contained in:
vhd 2020-01-10 23:05:05 +02:00 committed by modmuss50
parent 9e1b1a76e1
commit f1731fe925
6 changed files with 93 additions and 6 deletions

View file

@ -48,15 +48,15 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
public MachineRecipeDisplay(R recipe) {
this.recipe = recipe;
this.inputs = CollectionUtils.map(recipe.getRebornIngredients(), ing -> CollectionUtils.map(ing.getPreviewStacks(), EntryStack::create));
this.outputs = CollectionUtils.map(recipe.getOutputs(), EntryStack::create);
this.inputs = CollectionUtils.map(recipe.getRebornIngredients(), ing -> CollectionUtils.map(ing.getPreviewStacks(), RebornEntryStack::create));
this.outputs = CollectionUtils.map(recipe.getOutputs(), RebornEntryStack::create);
this.energy = recipe.getPower();
if (recipe instanceof BlastFurnaceRecipe) {
this.heat = ((BlastFurnaceRecipe) recipe).getHeat();
}
if (recipe instanceof RebornFluidRecipe) {
this.fluidInstance = ((RebornFluidRecipe) recipe).getFluidInstance();
inputs.add(Collections.singletonList(EntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue())));
inputs.add(Collections.singletonList(RebornEntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue())));
}
for (List<EntryStack> entries : inputs)
for (EntryStack stack : entries)