From 6bba29a007d46261e8dafeafb8fde92d6b2ee472 Mon Sep 17 00:00:00 2001 From: hiroscho Date: Tue, 27 Aug 2024 10:50:07 +0200 Subject: [PATCH 1/2] Fix inverter card for fluid storage bus (#224) --- .../github/common/parts/PartFluidStorageBus.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java b/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java index 58d4fb70..8bc71933 100644 --- a/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java +++ b/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; +import java.util.function.Predicate; import javax.annotation.Nullable; @@ -91,7 +92,7 @@ public class PartFluidStorageBus extends PartUpgradeable private boolean wasActive = false; private byte resetCacheLogic = 0; /** - * used when changing access settings to read the changes once + * used to read changes once when the list of extractable items was changed */ private boolean readOncePass = false; @@ -136,14 +137,6 @@ public class PartFluidStorageBus extends PartUpgradeable @Override public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) { - if (settingName == Settings.ACCESS && this.handler != null) { - AccessRestriction currentAccess = this.handler.getAccess(); - if (newValue != currentAccess && currentAccess.hasPermission(AccessRestriction.READ)) { - if (newValue == AccessRestriction.WRITE || newValue == AccessRestriction.READ) { - this.readOncePass = true; - } - } - } this.resetCache(true); this.getHost().markForSave(); } @@ -273,8 +266,9 @@ public class PartFluidStorageBus extends PartUpgradeable if (this.handler != null && this.handler.isExtractFilterActive() && !this.handler.getExtractPartitionList().isEmpty()) { List filteredChanges = new ArrayList<>(); + Predicate extractFilterCondition = this.handler.getExtractFilterCondition(); for (final IAEFluidStack changedFluid : change) { - if (this.handler.getExtractPartitionList().isListed(changedFluid)) { + if (extractFilterCondition.test(changedFluid)) { filteredChanges.add(changedFluid); } } @@ -381,6 +375,7 @@ public class PartFluidStorageBus extends PartUpgradeable this.handlerHash = newHandlerHash; this.handler = null; this.monitor = null; + this.readOncePass = true; if (target != null) { final IExternalStorageHandler esh = AEApi.instance().registries().externalStorage() .getHandler(target, this.getSide().getOpposite(), StorageChannel.FLUIDS, this.source); From a3eee96d75341178310b9e293c872da9f8429760 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Tue, 27 Aug 2024 10:50:59 +0200 Subject: [PATCH 2/2] update --- dependencies.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 89ec69fc..03fe06fb 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,7 +35,7 @@ */ dependencies { api('com.github.GTNewHorizons:NotEnoughItems:2.6.26-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-436-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-440-GTNH:dev') api('curse.maven:cofh-core-69162:2388751') api('com.github.GTNewHorizons:waila:1.8.1:dev') @@ -54,7 +54,7 @@ dependencies { compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.21-GTNH:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev') { transitive = false } - compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.49:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.50:dev") { transitive = false } runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.2:dev") runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.4.8:dev")