Removed color provider

This commit is contained in:
paulevsGitch 2021-07-10 16:25:34 +03:00
parent 2c8862a37b
commit 4040597a6d
475 changed files with 5411 additions and 7521 deletions

View file

@ -21,79 +21,73 @@ import java.util.Optional;
import java.util.stream.Collectors;
public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
private static List<EntryStack> fuel;
private Recipe<?> recipe;
private float xp;
private double smeltTime;
public REIAlloyingDisplay(AlloyingRecipe recipe) {
this(recipe, recipe.getExperience(), recipe.getSmeltTime());
}
protected REIAlloyingDisplay(Recipe<?> recipe, float xp, double smeltTime) {
super(
EntryIngredients.ofIngredients(recipe.getIngredients()),
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
);
super(EntryIngredients.ofIngredients(recipe.getIngredients()), Collections.singletonList(EntryIngredients.of(recipe.getResultItem())));
this.recipe = recipe;
this.xp = xp;
this.smeltTime = smeltTime;
}
public static List<EntryStack> getFuel() {
return fuel;
}
@Override
public @NotNull Optional<ResourceLocation> getDisplayLocation() {
return Optional.ofNullable(recipe).map(Recipe::getId);
}
@Override
public CategoryIdentifier<?> getCategoryIdentifier() {
return REIPlugin.ALLOYING;
}
// @Override
// public @NotNull List<List<EntryStack>> getRequiredEntries() {
// return this.input;
// }
public float getXp() {
return this.xp;
}
public double getSmeltTime() {
return this.smeltTime;
}
public Optional<Recipe<?>> getOptionalRecipe() {
return Optional.ofNullable(recipe);
}
@Override
public int getWidth() {
return 2;
}
@Override
public int getHeight() {
return 1;
}
// @Override
// public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<AbstractContainerMenu> containerInfo, AbstractContainerMenu container) {
// return this.input;
// }
static {
fuel = EndStoneSmelterBlockEntity.availableFuels().keySet().stream()
.map(Item::getDefaultInstance).map(EntryStacks::of)
.map(e -> e.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableComponent("category.rei.smelting.fuel")
.withStyle(ChatFormatting.YELLOW)))).collect(Collectors.toList());
fuel = EndStoneSmelterBlockEntity.availableFuels().keySet().stream().map(Item::getDefaultInstance).map(EntryStacks::of).map(e -> e.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableComponent("category.rei.smelting.fuel").withStyle(ChatFormatting.YELLOW)))).collect(Collectors.toList());
}
}