Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/long_patterns' into long_patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
lordIcocain committed Mar 2, 2025
2 parents 3deee86 + f293bc0 commit 1ead24b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 28 deletions.
22 changes: 11 additions & 11 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.7.27-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-533-GTNH:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.7.29-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-547-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.8.2:dev')
api("com.github.GTNewHorizons:GTNHLib:0.6.6:dev")
api("com.github.GTNewHorizons:GTNHLib:0.6.11:dev")

implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.7:dev") {
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.0:dev") {
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}

compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.0.3:dev')
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.5-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.1:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.2:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.99:dev') {
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.3:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.4:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.153:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}

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.11.4-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.5-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.22:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.10-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.6-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.26:dev") { transitive = false }

runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.4:dev")
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.33'
}


Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,15 @@ private void insertFluid(EntityPlayer player, int slotIndex, boolean shift) {

if (targetStack.getItem() instanceof IFluidContainerItem fcItem) {
if (emptiedTanks > 0) {
emptiedTanksStack = targetStack.copy();
emptiedTanksStack.stackSize = 1;
fcItem.drain(emptiedTanksStack, fluidPerContainer, true);
emptiedTanksStack.stackSize = emptiedTanks;
final ItemStack testDrainStack = targetStack.copy();
testDrainStack.stackSize = 1;
fcItem.drain(testDrainStack, fluidPerContainer, true);
if (testDrainStack.stackSize == 0) {
emptiedTanksStack = null;
} else {
emptiedTanksStack = testDrainStack.copy();
emptiedTanksStack.stackSize = emptiedTanks;
}
} else {
emptiedTanksStack = null;
}
Expand Down Expand Up @@ -390,8 +395,7 @@ private void insertFluid(EntityPlayer player, int slotIndex, boolean shift) {
} else if (partialTanksStack != null) {
player.inventory.setInventorySlotContents(slotIndex, partialTanksStack);
} else {
player.inventory.setItemStack(null);
shouldSendStack = false;
player.inventory.setInventorySlotContents(slotIndex, null);
}
}
if (shouldSendStack) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ protected void encodeFluidPattern() {
pattern.setInputs(collectInventory(this.craftingSlots));
pattern.setOutputs(collectInventory(this.outputSlots));
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
pattern.setCombine(this.combine ? 1 : 0);
patternSlotOUT.putStack(stampAuthor(pattern.writeToStack()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ private IStorageGrid getStorageGrid() {
public void provideCrafting(ICraftingProviderHelper craftingTracker) {
IStorageGrid storage = getStorageGrid();
if (storage == null) return;
IItemList<IAEFluidStack> fluidStorage = this.fluids.isEmpty() ? storage.getFluidInventory().getStorageList()
: this.fluids;
for (IAEFluidStack fluidStack : fluidStorage) {
if (this.fluids.isEmpty()) {
this.fluids = storage.getFluidInventory().getStorageList();
}
for (IAEFluidStack fluidStack : this.fluids) {
Fluid fluid = fluidStack.getFluid();
if (fluid == null) continue;
int maxCapacity = Util.FluidUtil.getCapacity(this.getContainerItem(), fluid);
Expand Down Expand Up @@ -212,12 +213,10 @@ public void postChange(IBaseMonitor<IAEFluidStack> monitor, Iterable<IAEFluidSta
BaseActionSource source) {
if (this.getProxy().isActive() && this.getStorageGrid() != null) {
boolean hasChanged = false;
IItemList<IAEFluidStack> stored = this.getStorageGrid().getFluidInventory().getStorageList();
for (IAEFluidStack tmp : change) {
if (stored.findPrecise(tmp) == null || this.fluids.findPrecise(tmp) == null) {
if (this.fluids.findPrecise(tmp) == null) {
hasChanged = true;
this.fluids = stored;
break;
this.fluids.add(tmp);
}
}
if (hasChanged) postEvent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ public boolean readFromStack() {
return false;
}
NBTTagCompound tag = Objects.requireNonNull(patternStack.getTagCompound());
setCanBeSubstitute(tag.getBoolean("beSubstitute") ? 1 : 0);
setCombine(tag.getInteger("combine"));

// may be possible to enter a partially-correct state if setInputs succeeds but setOutputs failed
// but outside code should treat it as completely incorrect and not attempt to make calls
return setInputs(readStackArray(tag.getTagList("in", Constants.NBT.TAG_COMPOUND)))
Expand Down

0 comments on commit 1ead24b

Please sign in to comment.