Epic REI displays. Thanks to shedaniel! (#2167)

* Epic REI displays

Signed-off-by: shedaniel <daniel@shedaniel.me>

* use the AbstractEnergyConsumingMachineCategory for ElectrolyzerCategory

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel 2020-07-18 23:58:35 +08:00 committed by GitHub
parent 140ff2f365
commit 01663648c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 807 additions and 363 deletions

View file

@ -49,8 +49,8 @@ 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(), RebornEntryStack::create));
this.outputs = CollectionUtils.map(recipe.getOutputs(), RebornEntryStack::create);
this.inputs = CollectionUtils.map(recipe.getRebornIngredients(), ing -> EntryStack.ofItemStacks(ing.getPreviewStacks()));
this.outputs = EntryStack.ofItemStacks(recipe.getOutputs());
this.time = recipe.getTime();
this.energy = recipe.getPower();
if (recipe instanceof BlastFurnaceRecipe) {
@ -58,7 +58,7 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
}
if (recipe instanceof RebornFluidRecipe) {
this.fluidInstance = ((RebornFluidRecipe) recipe).getFluidInstance();
inputs.add(Collections.singletonList(RebornEntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue())));
inputs.add(Collections.singletonList(EntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue())));
}
for (List<EntryStack> entries : inputs)
for (EntryStack stack : entries)