From dc47051dfa5342cb851b012d10e83578d3b38f5c Mon Sep 17 00:00:00 2001 From: hiroscho Date: Sat, 10 Aug 2024 17:24:39 +0200 Subject: [PATCH 1/6] Fix fluid autocrafting Depends on https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial/pull/545 --- .../com/glodblock/github/common/tile/TileFluidDiscretizer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java index bedb3c53..0fe2da1d 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java @@ -270,6 +270,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost FluidCraftingInventory() { invHandler.setPriority(Integer.MAX_VALUE); + invHandler.setCraftingInventory(true); } @Override From 3326e83865ca9898fa80a9316f377f085cdb2b9b Mon Sep 17 00:00:00 2001 From: Dream Master Date: Sun, 11 Aug 2024 18:14:08 +0700 Subject: [PATCH 2/6] update --- dependencies.gradle | 20 ++++++++++---------- settings.gradle | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 4c43d268..182c7b70 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,28 +34,28 @@ * 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.6.19-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-423-GTNH:dev') + api('com.github.GTNewHorizons:NotEnoughItems:2.6.22-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-426-GTNH:dev') api('curse.maven:cofh-core-69162:2388751') api('com.github.GTNewHorizons:waila:1.8.1:dev') - implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.5:dev") + implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.6:dev") - compileOnly("com.github.GTNewHorizons:GTNHLib:0.3.3:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GTNHLib:0.4.2:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') - compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.34:dev') { transitive = false } + compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.7:dev') compileOnly('com.github.GTNewHorizons:EnderIO:2.8.17:dev') - compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.123:dev') { + compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.148: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.10.18-GTNH:dev') { transitive = false } - compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.21-GTNH:dev') { transitive = false } - compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.38:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.19-GTNH:dev') { transitive = false } + compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev') { transitive = false } + compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.42:dev") { transitive = false } runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.2:dev") - runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.3.3:dev") + runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.4.2:dev") } diff --git a/settings.gradle b/settings.gradle index 54797868..242692e5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.25' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26' } From e45710986cbfccf5e68add3a6ebcb29d478d863a Mon Sep 17 00:00:00 2001 From: Dream Master Date: Sun, 11 Aug 2024 18:22:17 +0700 Subject: [PATCH 3/6] update --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index 182c7b70..13e1bd09 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,7 +35,7 @@ */ dependencies { api('com.github.GTNewHorizons:NotEnoughItems:2.6.22-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-426-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-427-GTNH-pre:dev') api('curse.maven:cofh-core-69162:2388751') api('com.github.GTNewHorizons:waila:1.8.1:dev') From 52d99befdc8281f6ea9a354c08bc604d4dfe8c2c Mon Sep 17 00:00:00 2001 From: hiroscho Date: Mon, 12 Aug 2024 18:15:21 +0200 Subject: [PATCH 4/6] rename --- .../com/glodblock/github/common/tile/TileFluidDiscretizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java index 0fe2da1d..8291f1ef 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java @@ -270,7 +270,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost FluidCraftingInventory() { invHandler.setPriority(Integer.MAX_VALUE); - invHandler.setCraftingInventory(true); + invHandler.setIsAutoCraftingInventory(true); } @Override From b919714e6ff2e544a0ca2ef269530ca64f18bac1 Mon Sep 17 00:00:00 2001 From: hiroscho Date: Mon, 12 Aug 2024 20:10:36 +0200 Subject: [PATCH 5/6] Add FluidCraftingInventoryHandler so that fluid crafting isn't handled in Pass 2 --- .../common/tile/TileFluidDiscretizer.java | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java index 8291f1ef..e2173a12 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java @@ -264,13 +264,45 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost } } + private class FluidCraftingInventoryHandler extends MEInventoryHandler { + + public FluidCraftingInventoryHandler(IMEInventory i, StorageChannel channel) { + super(i, channel); + } + + @Override + public boolean isPrioritized(IAEFluidStack input) { + return true; + } + + @Override + public boolean canAccept(IAEFluidStack input) { + ICraftingGrid craftingGrid; + try { + craftingGrid = getProxy().getGrid().getCache(ICraftingGrid.class); + } catch (GridAccessException e) { + return false; + } + if (craftingGrid instanceof CraftingGridCache craftingGridCache) { + return craftingGridCache.canAccept(ItemFluidDrop.newAeStack(input)); + } + return false; + } + + @Override + public boolean isAutoCraftingInventory() { + return true; + } + } + private class FluidCraftingInventory implements IMEInventory { - private final MEInventoryHandler invHandler = new MEInventoryHandler<>(this, getChannel()); + private final MEInventoryHandler invHandler = new FluidCraftingInventoryHandler( + this, + getChannel()); FluidCraftingInventory() { invHandler.setPriority(Integer.MAX_VALUE); - invHandler.setIsAutoCraftingInventory(true); } @Override From 8d700458f7447fee5d0089af1f078c22d4513527 Mon Sep 17 00:00:00 2001 From: hiroscho Date: Sat, 17 Aug 2024 23:41:03 +0200 Subject: [PATCH 6/6] update deps --- dependencies.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 13e1bd09..29b5ba65 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,28 +34,28 @@ * 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.6.22-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-427-GTNH-pre:dev') + api('com.github.GTNewHorizons:NotEnoughItems:2.6.25-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-428:dev') api('curse.maven:cofh-core-69162:2388751') api('com.github.GTNewHorizons:waila:1.8.1:dev') implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.6:dev") - compileOnly("com.github.GTNewHorizons:GTNHLib:0.4.2:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GTNHLib:0.4.3:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.7:dev') compileOnly('com.github.GTNewHorizons:EnderIO:2.8.17:dev') - compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.148:dev') { + compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.04: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.10.19-GTNH:dev') { transitive = false } + compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.20-GTNH:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev') { transitive = false } compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.42:dev") { transitive = false } runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.2:dev") - runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.4.2:dev") + runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.4.3:dev") }