Skip to content

Commit

Permalink
Merge branch 'master' into fix_interface_term
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Oct 12, 2023
2 parents 42d7eb3 + 8186653 commit 11fd470
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1695474595
//version: 1696265388
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -798,7 +798,7 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.5')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.7')
}

java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
Expand Down
10 changes: 5 additions & 5 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ dependencies {
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')

compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.34:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:WirelessCraftingTerminal:1.9.4:dev")
compileOnly("com.github.GTNewHorizons:WirelessCraftingTerminal:1.10.0:dev")

compileOnly('com.github.GTNewHorizons:ForestryMC:4.6.14:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.5.0:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.27:dev') {
compileOnly('com.github.GTNewHorizons:EnderIO:2.5.2:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.35:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.17-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.4.13-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.11:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.3.7:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.13:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.3.9:dev") { transitive = false }
}
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,18 @@ protected boolean checkHasFluidPattern() {
return hasFluid && search; // search=false -> outputs were empty
}

protected ItemStack stampAuthor(ItemStack patternStack) {
patternStack.stackTagCompound.setString("author", getPlayerInv().player.getCommandSenderName());
return patternStack;
}

protected void encodeFluidPattern() {
ItemStack patternStack = new ItemStack(ItemAndBlockHolder.PATTERN);
FluidPatternDetails pattern = new FluidPatternDetails(patternStack);
pattern.setInputs(collectInventory(this.craftingSlots));
pattern.setOutputs(collectInventory(this.outputSlots));
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
patternSlotOUT.putStack(pattern.writeToStack());
patternSlotOUT.putStack(stampAuthor(pattern.writeToStack()));
}

protected static IAEItemStack[] collectInventory(Slot[] slots) {
Expand Down Expand Up @@ -440,6 +445,7 @@ else if (output == null) {
encodedValue.setBoolean("beSubstitute", this.beSubstitute);
encodedValue.setBoolean("prioritize", this.prioritize);
output.setTagCompound(encodedValue);
stampAuthor(output);
this.patternSlotOUT.putStack(output);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<

public FluidPatternDetails(ItemStack stack) {
this.patternStack = stack;
this.patternStackAe = Objects.requireNonNull(AEItemStack.create(stack)); // s2g
if (stack.stackTagCompound.hasKey("author")) {
final ItemStack forComparison = this.patternStack.copy();
forComparison.stackTagCompound.removeTag("author");
this.patternStackAe = Objects.requireNonNull(AEItemStack.create(forComparison)); // s2g
} else {
this.patternStackAe = Objects.requireNonNull(AEItemStack.create(stack)); // s2g
}
}

public boolean canBeSubstitute() {
Expand Down

0 comments on commit 11fd470

Please sign in to comment.