Skip to content

Commit

Permalink
Merge in v1.4.7 from upstream (#17)
Browse files Browse the repository at this point in the history
* Merge in v1.4.8 from upstream

 * Add nanites to GregTech Material Parts diagram
 * Add another row for tools in GregTech Material Tools diagram
 * Update buildscript
 * Apply spotless

* Add missing runtime dep

* Try updating dependencies

* Update dependencies

 * Add more missing runtime dependencies
 * Try sorting and organizing things a bit

* Update GT++ version

* Update Bartworks version

* Add another missing runtime dep

* Update dependencies.gradle

* Disable GT++ in runtime again

* Update repositories.gradle

* derp

* Try adding Galacticraft to runtime deps

* Nope, try GoodGenerator instead

* Try adding TecTech too

* Fix dep versions

* duct tape

* Add repository for fernflower?

* Remove unneeded repo and probably don't need TecTech

* Update build-and-test.yml

* Try GT++ in runtime again. Bump time to 180s

Co-authored-by: Martin Robertz <[email protected]>
  • Loading branch information
D-Cysteine and Dream-Master authored Jan 13, 2023
1 parent 41aba3f commit d460ab1
Show file tree
Hide file tree
Showing 103 changed files with 2,717 additions and 3,104 deletions.
44 changes: 44 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
* text eol=lf

*.[jJ][aA][rR] binary

*.[pP][nN][gG] binary
*.[jJ][pP][gG] binary
*.[jJ][pP][eE][gG] binary
*.[gG][iI][fF] binary
*.[tT][iI][fF] binary
*.[tT][iI][fF][fF] binary
*.[iI][cC][oO] binary
*.[sS][vV][gG] text
*.[eE][pP][sS] binary
*.[xX][cC][fF] binary

*.[kK][aA][rR] binary
*.[mM]4[aA] binary
*.[mM][iI][dD] binary
*.[mM][iI][dD][iI] binary
*.[mM][pP]3 binary
*.[oO][gG][gG] binary
*.[rR][aA] binary

*.7[zZ] binary
*.[gG][zZ] binary
*.[tT][aA][rR] binary
*.[tT][gG][zZ] binary
*.[zZ][iI][pP] binary

*.[tT][cC][nN] binary
*.[sS][oO] binary
*.[dD][lL][lL] binary
*.[dD][yY][lL][iI][bB] binary
*.[pP][sS][dD] binary
*.[tT][tT][fF] binary
*.[oO][tT][fF] binary

*.[pP][aA][tT][cC][hH] -text

*.[bB][aA][tT] text eol=crlf
*.[cC][mM][dD] text eol=crlf
*.[pP][sS]1 text eol=crlf

*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
secrets: inherit
with:
timeout: 120
timeout: 180
675 changes: 524 additions & 151 deletions build.gradle

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
// Add your dependencies here

dependencies {
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.6-GTNH:dev')
compileOnly('com.google.auto.value:auto-value-annotations:1.8.2')
annotationProcessor('com.google.auto.value:auto-value:1.8.2')

compile('com.github.GTNewHorizons:NotEnoughItems:2.3.20-GTNH:dev')

compile('com.github.GTNewHorizons:NewHorizonsCoreMod:1.9.79:dev') {transitive=false}
compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.49:dev') {transitive=false}
compile('com.github.GTNewHorizons:bartworks:0.5.84:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:GTplusplus:1.7.27:dev') {transitive=false}
compile('com.github.GTNewHorizons:EnderStorage:1.4.12:dev') {transitive=false}
compile('com.github.GTNewHorizons:DetravScannerMod:1.6.9:dev') {transitive=false}
compile('com.github.GTNewHorizons:ForestryMC:4.4.14:api') {transitive=false}
compile('com.github.GTNewHorizons:Railcraft:9.13.10:api') {transitive=false}
compile('com.github.GTNewHorizons:EnderIO:2.3.1.44:api') {transitive=false}
compile('com.github.GTNewHorizons:BuildCraft:7.1.27:api') {transitive=false}
compile('com.github.GTNewHorizons:EnderStorage:1.4.12:dev') {transitive=false}
compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.214:dev') {transitive=false}
compile('com.github.GTNewHorizons:GTplusplus:1.7.190:dev') {transitive=false}
compile('com.github.GTNewHorizons:NewHorizonsCoreMod:1.9.127:dev') {transitive=false}
compile('com.github.GTNewHorizons:bartworks:0.5.138:dev') {transitive=false}

// Compile-time dependencies of GT5
compile('com.github.GTNewHorizons:BuildCraft:7.1.28:api') {transitive=false}
compile('com.github.GTNewHorizons:EnderIO:2.3.1.49:api') {transitive=false}
compile('com.github.GTNewHorizons:ForestryMC:4.5.6:api') {transitive=false}
compile('com.github.GTNewHorizons:ProjectRed:4.7.9-GTNH:dev') {transitive=false}
compile('com.github.GTNewHorizons:Railcraft:9.13.14:api') {transitive=false}

compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
runtime("curse.maven:cofh-core-69162:2388751")
runtime('curse.maven:advsolar-362768:2885953')

runtime('com.github.GTNewHorizons:Baubles:1.0.1.14:dev')
runtime('com.github.GTNewHorizons:Yamcl:0.5.84:dev')
runtime('com.github.GTNewHorizons:Chisel:2.10.16-GTNH:dev')
runtime('com.github.GTNewHorizons:ForgeMultipart:1.3.0:dev')
runtime('com.github.GTNewHorizons:ForgeRelocation:0.0.3:dev')
runtime('com.github.GTNewHorizons:GTNHLib:0.0.8.1:dev')
runtime('com.github.GTNewHorizons:GoodGenerator:0.4.76:dev')
runtime('com.github.GTNewHorizons:ModularUI:1.0.43:dev')
runtime('com.github.GTNewHorizons:MrTJPCore:1.1.1:dev')
runtime('com.github.GTNewHorizons:StructureLib:1.2.0-beta.2:dev')
runtime('com.github.GTNewHorizons:GTNHLib:0.0.5:dev')
runtime('com.github.GTNewHorizons:Chisel:2.10.10-GTNH:dev')
runtime('com.github.GTNewHorizons:Yamcl:0.5.84:dev')
runtime('com.github.GTNewHorizons:waila:1.5.22:dev')

compileOnly('com.google.auto.value:auto-value-annotations:1.8.2') {transitive=false}
annotationProcessor('com.google.auto.value:auto-value:1.8.2')
}
6 changes: 3 additions & 3 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories {
maven {
url "https://cursemaven.com"
}
maven {
url = "https://jitpack.io"
}
maven{
url "https://maven.fabricmc.net/"
}
}
10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
}

apply plugin: 'com.diffplug.blowdryerSetup'

blowdryerSetup {
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.1.5')
//devLocal '.' // Use this when testing config updates locally
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.github.dcysteine.neicustomdiagram.api.draw.Dimension;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -35,8 +34,7 @@ public Iterable<Interactable> interactables(DiagramState diagramState) {
List<Iterable<Interactable>> iterables = new ArrayList<>();

iterables.add(super.interactables(diagramState));
activeDiagrams(diagramState)
.forEach(diagram -> iterables.add(diagram.interactables(diagramState)));
activeDiagrams(diagramState).forEach(diagram -> iterables.add(diagram.interactables(diagramState)));

return Iterables.concat(iterables);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.github.dcysteine.neicustomdiagram.api.diagram.interactable.Interactable;
import com.github.dcysteine.neicustomdiagram.api.diagram.matcher.DiagramMatcher;
import com.google.common.collect.ImmutableMap;

import java.util.Collection;
import java.util.Map;
import java.util.function.Supplier;
Expand Down Expand Up @@ -34,7 +33,8 @@ public class CustomDiagramGroup extends DiagramGroup {
private final ImmutableMap<String, Supplier<Collection<Diagram>>> customBehaviorMap;

public CustomDiagramGroup(
DiagramGroupInfo info, DiagramMatcher matcher,
DiagramGroupInfo info,
DiagramMatcher matcher,
Supplier<DiagramState> diagramStateSupplier,
Map<String, Supplier<Collection<Diagram>>> customBehaviorMap) {
super(info, matcher, diagramStateSupplier);
Expand All @@ -43,7 +43,8 @@ public CustomDiagramGroup(
}

public CustomDiagramGroup(
DiagramGroupInfo info, DiagramMatcher matcher,
DiagramGroupInfo info,
DiagramMatcher matcher,
Map<String, Supplier<Collection<Diagram>>> customBehaviorMap) {
super(info, matcher);

Expand All @@ -62,8 +63,7 @@ public CustomDiagramGroup newInstance(Iterable<? extends Diagram> diagrams) {
}

@Override
protected Collection<Diagram> matchDiagrams(
String id, Interactable.RecipeType recipeType, Object... stacks) {
protected Collection<Diagram> matchDiagrams(String id, Interactable.RecipeType recipeType, Object... stacks) {
if (customBehaviorMap.containsKey(id)) {
return customBehaviorMap.get(id).get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.google.common.collect.ImmutableMultiset;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multiset;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
Expand All @@ -36,8 +35,7 @@ public class Diagram {
protected final ImmutableList<? extends Interactable> interactables;

public Diagram(
Layout layout, Multiset<Layout.Key> slotInsertions,
ImmutableList<? extends Interactable> interactables) {
Layout layout, Multiset<Layout.Key> slotInsertions, ImmutableList<? extends Interactable> interactables) {
this.layout = layout;
this.slotInsertions = ImmutableMultiset.copyOf(slotInsertions);
this.interactables = interactables;
Expand Down Expand Up @@ -234,8 +232,8 @@ public SlotGroupAutoSubBuilder autoInsertIntoSlotGroup(Layout.SlotGroupKey key)
}

Layout layout = findLayoutContainingSlotGroup(key);
SlotGroupAutoSubBuilder builder =
new SlotGroupAutoSubBuilder(layout, key, layout.slotGroup(key).get());
SlotGroupAutoSubBuilder builder = new SlotGroupAutoSubBuilder(
layout, key, layout.slotGroup(key).get());
slotGroupAutoSubBuilders.put(key, builder);
return builder;
}
Expand All @@ -252,7 +250,8 @@ public SlotGroupAutoSubBuilder autoInsertIntoSlotGroup(Layout.SlotGroupKey key)
*/
public SlotGroupManualSubBuilder manualInsertIntoSlotGroup(Layout.SlotGroupKey key) {
Layout layout = findLayoutContainingSlotGroup(key);
return new SlotGroupManualSubBuilder(layout, key, layout.slotGroup(key).get());
return new SlotGroupManualSubBuilder(
layout, key, layout.slotGroup(key).get());
}

public Builder addInteractable(Interactable interactable) {
Expand All @@ -279,8 +278,7 @@ public final class SlotGroupAutoSubBuilder {
private final Layout.SlotGroupKey slotGroupKey;
private final Iterator<Slot> slotIterator;

private SlotGroupAutoSubBuilder(
Layout layout, Layout.SlotGroupKey slotGroupKey, SlotGroup slotGroup) {
private SlotGroupAutoSubBuilder(Layout layout, Layout.SlotGroupKey slotGroupKey, SlotGroup slotGroup) {
this.layout = layout;
this.slotGroupKey = slotGroupKey;
this.slotIterator = slotGroup.slots().iterator();
Expand All @@ -301,8 +299,7 @@ public SlotGroupAutoSubBuilder insertIntoNextSlot(DisplayComponent... components
/**
* @throws java.util.NoSuchElementException if this slot group is full.
*/
public SlotGroupAutoSubBuilder insertIntoNextSlot(
Iterable<DisplayComponent> components) {
public SlotGroupAutoSubBuilder insertIntoNextSlot(Iterable<DisplayComponent> components) {
if (Iterables.isEmpty(components)) {
return this;
}
Expand Down Expand Up @@ -351,8 +348,7 @@ public SlotGroupAutoSubBuilder insertEachSafe(Iterable<DisplayComponent> compone
*
* @throws java.util.NoSuchElementException if this slot group is too small.
*/
public SlotGroupAutoSubBuilder insertEachGroup(
Iterable<? extends Iterable<DisplayComponent>> components) {
public SlotGroupAutoSubBuilder insertEachGroup(Iterable<? extends Iterable<DisplayComponent>> components) {
components.forEach(this::insertIntoNextSlot);
return this;
}
Expand All @@ -367,12 +363,11 @@ public SlotGroupAutoSubBuilder insertEachGroup(
*
* @throws java.util.NoSuchElementException if this slot group is already full.
*/
public <T extends Iterable<DisplayComponent>> SlotGroupAutoSubBuilder
insertEachGroupSafe(Iterable<T> components) {
Iterator<T> iterator =
StreamSupport.stream(components.spliterator(), false)
.filter(iter -> !Iterables.isEmpty(iter))
.iterator();
public <T extends Iterable<DisplayComponent>> SlotGroupAutoSubBuilder insertEachGroupSafe(
Iterable<T> components) {
Iterator<T> iterator = StreamSupport.stream(components.spliterator(), false)
.filter(iter -> !Iterables.isEmpty(iter))
.iterator();

while (slotIterator.hasNext() && iterator.hasNext()) {
Slot slot = slotIterator.next();
Expand Down Expand Up @@ -407,8 +402,7 @@ public final class SlotGroupManualSubBuilder {
private final Layout.SlotGroupKey slotGroupKey;
private final SlotGroup slotGroup;

private SlotGroupManualSubBuilder(
Layout layout, Layout.SlotGroupKey slotGroupKey, SlotGroup slotGroup) {
private SlotGroupManualSubBuilder(Layout layout, Layout.SlotGroupKey slotGroupKey, SlotGroup slotGroup) {
this.layout = layout;
this.slotGroupKey = slotGroupKey;
this.slotGroup = slotGroup;
Expand All @@ -418,10 +412,8 @@ private SlotGroupManualSubBuilder(
* It is the caller's responsibility to avoid inserting into the same slot multiple
* times.
*/
public SlotGroupManualSubBuilder insertIntoSlot(
int x, int y, DisplayComponent... components) {
interactablesBuilder.add(
new InteractiveComponentGroup(slotGroup.slot(x, y), components));
public SlotGroupManualSubBuilder insertIntoSlot(int x, int y, DisplayComponent... components) {
interactablesBuilder.add(new InteractiveComponentGroup(slotGroup.slot(x, y), components));
layouts.put(layout, true);
slotInsertions.add(slotGroupKey);
return this;
Expand All @@ -431,10 +423,8 @@ public SlotGroupManualSubBuilder insertIntoSlot(
* It is the caller's responsibility to avoid inserting into the same slot multiple
* times.
*/
public SlotGroupManualSubBuilder insertIntoSlot(
int x, int y, Iterable<DisplayComponent> components) {
interactablesBuilder.add(
new InteractiveComponentGroup(slotGroup.slot(x, y), components));
public SlotGroupManualSubBuilder insertIntoSlot(int x, int y, Iterable<DisplayComponent> components) {
interactablesBuilder.add(new InteractiveComponentGroup(slotGroup.slot(x, y), components));
layouts.put(layout, true);
slotInsertions.add(slotGroupKey);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

public interface DiagramGenerator {
DiagramGroupInfo info();

DiagramGroup generate();
}
Loading

0 comments on commit d460ab1

Please sign in to comment.