Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethryan committed Apr 23, 2024
1 parent 0a82766 commit a6ce4c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,9 @@ class DiagramBuilder {
List<ItemComponent> gregTechOres = filteredRawOres.stream().filter(GregTechOreProcessing::isGregTechOreBlock)
.collect(Collectors.toList());

// Try to show a GregTech raw ore, if there are any.
List<ItemComponent> gregTechRawOres = filteredRawOres.stream().filter(GregTechOreProcessing::isGregTechOreBlock)
.collect(Collectors.toList());

if (!gregTechOres.isEmpty()) {
this.rawOre = gregTechOres.get(0);
this.rawOre2 = gregTechRawOres.get(0);
this.rawOre2 = gregTechOres.get(0);
} else if (!filteredRawOres.isEmpty()) {
this.rawOre = filteredRawOres.get(0);
this.rawOre2 = filteredRawOres.get(0);
Expand All @@ -89,8 +85,6 @@ void buildDiagram(ComponentDiagramMatcher.Builder matcherBuilder) {
diagramBuilder.addAllOptionalLayouts(layoutHandler.layouts())
.insertIntoSlot(LayoutHandler.SlotKeys.RAW_ORE, DisplayComponent.builder(rawOre).build());

//diagramBuilder.autoInsertIntoSlotGroup(LayoutHandler.SlotGroupKeys.RAW_ORE2).insertIntoNextSlot(DisplayComponent.builder(rawOre2).build());

Optional<ItemComponent> crushedOreOptional = handleRecipes(
RecipeHandler.RecipeMap.MACERATOR,
rawOre,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ static final class SlotKeys {

static final class SlotGroupKeys {

static final Layout.SlotGroupKey RAW_ORE2 = Layout.SlotGroupKey.create("raw-ore2");
static final Layout.SlotGroupKey RAW_ORE_MACERATE = Layout.SlotGroupKey.create("raw-ore-macerate");
static final Layout.SlotGroupKey CRUSHED_ORE_MACERATE = Layout.SlotGroupKey.create("crushed-ore-macerate");
static final Layout.SlotGroupKey CRUSHED_ORE_WASH = Layout.SlotGroupKey.create("crushed-ore-wash");
Expand Down Expand Up @@ -91,7 +90,7 @@ ImmutableList<Layout> layouts() {

//Ores Block
private Layout buildRawOreLayout() {
Slot inputSlot = Slot.builder(Grid.GRID.grid(6, 2)).setDrawFunction(Draw::drawSlot)
Slot inputSlot = Slot.builder(Grid.GRID.grid(6, 4)).setDrawFunction(Draw::drawBigSlot)
.setTooltip(Tooltip.create(Lang.GREGTECH_5_ORE_PROCESSING.trans("oreslot"), Tooltip.SLOT_FORMATTING))
.build();

Expand All @@ -100,18 +99,8 @@ private Layout buildRawOreLayout() {
return Layout.builder().putSlot(SlotKeys.RAW_ORE, inputSlot).addInteractable(allDiagramsButton).build();
}

//Raw Ores Item
private Layout buildRawOre2Layout() {
SlotGroup inputSlot = SlotGroup.builder(1, 1, Grid.GRID.grid(6, 4), Grid.Direction.W)
.setDefaultTooltip(Tooltip.create(Lang.GREGTECH_5_ORE_PROCESSING.trans("raworeslot"), Tooltip.SLOT_FORMATTING))
.build();

return Layout.builder().putSlotGroup(SlotGroupKeys.RAW_ORE2, inputSlot).build();
}

private Layout buildRawOreMacerateLayout() {
Lines lines = Lines.builder(Grid.GRID.grid(6, 2))
.addSegment(Grid.GRID.grid(4, 2))
Lines lines = Lines.builder(Grid.GRID.grid(6, 4)).addSegment(Grid.GRID.grid(4, 4))
.addArrow(Grid.GRID.edge(4, 10, Grid.Direction.N)).build();

CustomInteractable label = labelHandler.buildLabel(LabelHandler.ItemLabel.MACERATOR, Grid.GRID.grid(4, 8));
Expand Down

0 comments on commit a6ce4c1

Please sign in to comment.