- Got all hammers back
- Added anvil level and recipe input count
This commit is contained in:
parent
7b40047213
commit
68636e2ecd
18 changed files with 176 additions and 85 deletions
|
@ -2,6 +2,7 @@ package ru.betterend.integration.rei;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -49,10 +50,12 @@ public class REIAnvilCategory implements TransferRecipeCategory<REIAnvilDisplay>
|
|||
int y = startPoint.y;
|
||||
widgets.add(Widgets.createResultSlotBackground(new Point(x + 61, y + 4)));
|
||||
List<List<EntryStack>> inputEntries = display.getInputEntries();
|
||||
List<EntryStack> materials = inputEntries.get(1);
|
||||
materials.forEach(entryStack -> entryStack.setAmount(display.getInputCount()));
|
||||
widgets.add(Widgets.createArrow(new Point(x + 24, y + 3)));
|
||||
widgets.add(Widgets.createLabel(new Point(bounds.x + bounds.width - 5, bounds.y + bounds.height - 12),
|
||||
new TranslatableText("category.rei.damage.amount&dmg", display.getDamage())).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
widgets.add(Widgets.createSlot(new Point(x - 20, y + 3)).entries(inputEntries.get(1)).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x - 20, y + 3)).entries(materials).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 1, y + 3)).entries(inputEntries.get(0)).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 61, y + 4)).entries(display.getResultingEntries().get(0)).disableBackground().markOutput());
|
||||
return widgets;
|
||||
|
|
|
@ -16,9 +16,9 @@ import ru.betterend.recipe.builders.AnvilRecipe;
|
|||
|
||||
public class REIAnvilDisplay implements TransferRecipeDisplay {
|
||||
|
||||
private AnvilRecipe recipe;
|
||||
private List<List<EntryStack>> input;
|
||||
private List<EntryStack> output;
|
||||
private final AnvilRecipe recipe;
|
||||
private final List<List<EntryStack>> input;
|
||||
private final List<EntryStack> output;
|
||||
|
||||
public REIAnvilDisplay(AnvilRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
|
@ -29,6 +29,10 @@ public class REIAnvilDisplay implements TransferRecipeDisplay {
|
|||
public int getDamage() {
|
||||
return this.recipe.getDamage();
|
||||
}
|
||||
|
||||
public int getInputCount() {
|
||||
return this.recipe.getInputCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Optional<Identifier> getRecipeLocation() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue