New REI Infusion view

This commit is contained in:
Aleksey 2020-12-04 09:41:59 +03:00
parent b7c0ce452e
commit f75ad93437
5 changed files with 14 additions and 20 deletions

View file

@ -25,7 +25,7 @@ import ru.betterend.util.LangUtil;
public class REIInfusionCategory implements TransferRecipeCategory<REIInfusionDisplay> {
private final static Identifier COMPASS_IMG = BetterEnd.makeID("textures/gui/compass.png");
private final static Identifier BACKGROUND = BetterEnd.makeID("textures/gui/rei_infusion.png");
@Override
public @NotNull Identifier getIdentifier() {
@ -49,23 +49,21 @@ public class REIInfusionCategory implements TransferRecipeCategory<REIInfusionDi
@Override
public @NotNull List<Widget> setupDisplay(REIInfusionDisplay display, Rectangle bounds) {
Point centerPoint = new Point(bounds.getCenterX() - 34, bounds.getCenterY() - 6);
Point centerPoint = new Point(bounds.getCenterX() - 34, bounds.getCenterY() - 2);
List<Widget> widgets = Lists.newArrayList();
widgets.add(Widgets.createRecipeBase(bounds));
List<List<EntryStack>> inputEntries = display.getInputEntries();
List<List<EntryStack>> outputEntries = display.getResultingEntries();
widgets.add(Widgets.createArrow(new Point(centerPoint.x + 48, centerPoint.y)));
widgets.add(Widgets.createTexturedWidget(COMPASS_IMG, centerPoint.x - 40, centerPoint.y - 40, 0.0F, 0.0F, 96, 96, 512, 512, 512, 512));
widgets.add(Widgets.createSlot(centerPoint).entries(inputEntries.get(0)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y - 28)).entries(inputEntries.get(1)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 28, centerPoint.y)).entries(inputEntries.get(3)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y + 28)).entries(inputEntries.get(5)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 28, centerPoint.y)).entries(inputEntries.get(7)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 24, centerPoint.y - 24)).entries(inputEntries.get(2)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 24, centerPoint.y + 24)).entries(inputEntries.get(4)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 24, centerPoint.y + 24)).entries(inputEntries.get(6)).markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 24, centerPoint.y - 24)).entries(inputEntries.get(8)).markInput());
widgets.add(Widgets.createResultSlotBackground(new Point(centerPoint.x + 80, centerPoint.y)));
widgets.add(Widgets.createTexturedWidget(BACKGROUND, bounds.x, bounds.y, 0, 0, 150, 104, 150, 104));
widgets.add(Widgets.createSlot(centerPoint).entries(inputEntries.get(0)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y - 28)).entries(inputEntries.get(1)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 28, centerPoint.y)).entries(inputEntries.get(3)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y + 28)).entries(inputEntries.get(5)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 28, centerPoint.y)).entries(inputEntries.get(7)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 24, centerPoint.y - 24)).entries(inputEntries.get(2)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 24, centerPoint.y + 24)).entries(inputEntries.get(4)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 24, centerPoint.y + 24)).entries(inputEntries.get(6)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x - 24, centerPoint.y - 24)).entries(inputEntries.get(8)).disableBackground().markInput());
widgets.add(Widgets.createSlot(new Point(centerPoint.x + 80, centerPoint.y)).entries(outputEntries.get(0)).disableBackground().markOutput());
widgets.add(Widgets.createLabel(new Point(bounds.getMaxX() - 5, bounds.y + 6), new TranslatableText("category.rei.infusion.time&val", display.getInfusionTime()))
.noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));

View file

@ -2,7 +2,7 @@
"itemGroup.betterend.items": "Better End",
"category.rei.damage.amount&dmg": "Tool damage: %s",
"category.rei.infusion.time&val": "Infusion Time: %s",
"category.rei.infusion.time&val": "Time: %s",
"biome.betterend.foggy_mushroomland": "Foggy Mushroomland",
"biome.betterend.dust_wastelands": "Dust Wastelands",
@ -285,9 +285,7 @@
"block.betterend.end_stone_lantern": "End Stone Lantern",
"block.betterend.violecite_lantern": "Violecite Lantern",
"entity.betterend.dragonfly": "Dragonfly",
"entity.betterend.end_fish": "End Fish",
"entity.betterend.end_slime": "End Slime",
"entity.betterend.shadow_walker": "Shadow Walker",
"item.betterend.spawn_egg_shadow_walker": "Shadow Walker Spawn Egg",

View file

@ -2,7 +2,7 @@
"itemGroup.betterend.items": "Улучшенный Край",
"category.rei.damage.amount&dmg": "Износ инструмента: %s",
"category.rei.infusion.time&val": "Время наполнения: %s",
"category.rei.infusion.time&val": "Время: %s",
"biome.betterend.foggy_mushroomland": "Туманное гриболесье",
"biome.betterend.dust_wastelands": "Пыльные пустоши",
@ -287,9 +287,7 @@
"block.betterend.end_stone_lantern": "Фонарь из камня Края",
"block.betterend.violecite_lantern": "Виолецитовый фонарь",
"entity.betterend.dragonfly": "Стрекоза",
"entity.betterend.end_fish": "Рыба Края",
"entity.betterend.end_slime": "Слизень Края",
"entity.betterend.shadow_walker": "Теневой ходок",
"item.betterend.spawn_egg_shadow_walker": "Яйцо призыва теневого ходока",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB