Refactor and import cleanup (Excluding network PR changed files)

This commit is contained in:
Justin Vitale 2020-07-09 23:04:42 +10:00
parent a36a0e6f4a
commit c4ef977f16
165 changed files with 1572 additions and 1625 deletions

View file

@ -38,15 +38,15 @@ import java.util.List;
import java.util.Optional;
public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDisplay {
private final R recipe;
private List<List<EntryStack>> inputs;
private List<EntryStack> outputs;
private final List<List<EntryStack>> inputs;
private final 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));
@ -66,43 +66,43 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
for (EntryStack stack : outputs)
ReiPlugin.applyCellEntry(stack);
}
public int getEnergy() {
return energy;
}
public int getHeat() {
return heat;
}
public int getTime() {
return time;
}
public FluidInstance getFluidInstance() {
return fluidInstance;
}
@Override
public Optional<Identifier> getRecipeLocation() {
return Optional.ofNullable(recipe).map(RebornRecipe::getId);
}
@Override
public List<List<EntryStack>> getInputEntries() {
return inputs;
}
@Override
public List<List<EntryStack>> getRequiredEntries() {
return inputs;
}
@Override
public List<EntryStack> getOutputEntries() {
return outputs;
}
@Override
public Identifier getRecipeCategory() {
return recipe.getRebornRecipeType().getName();