Compare commits

..
Author SHA1 Message Date
lc-1337 2688a312b9 replenisher fixes, 2.8 2.9 (#373)
(cherry picked from commit 93688313e6)
2025-12-07 14:31:44 +01:00
hiroscho 2255d354e2 update 2025-12-07 13:30:01 +01:00
hiroscho b3dc12ec3d Fix dupe bug for dual p2p interface (#352)
(cherry picked from commit 488b08f1fa)
2025-12-07 13:26:53 +01:00
3 changed files with 14 additions and 12 deletions

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.8.25-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-693-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-695-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.9.7:dev')
api("com.github.GTNewHorizons:GTNHLib:0.7.3:dev")
@@ -230,6 +230,7 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
Platform.spawnDrops(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, drops);
}
duality.setStorage(p2p.duality.getStorage());
duality.setSlotInv(p2p.duality.getSlotInv());
duality.sharedInventory = true;
} else {
if (duality.sharedInventory) {
@@ -252,24 +252,24 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added) {
switch (mc) {
case setInventorySlotContents -> {
if (added != null) {
if (inv == cell) {
if (inv == cell) {
if (added != null) {
if (added.getItem() instanceof ItemBasicStorageCell ibsc) {
totalBytes = ibsc.getBytesLong(added);
} else if (added.getItem() instanceof FCBaseItemCell fcbic) {
totalBytes = fcbic.getBytes(added);
}
getProxy().setIdlePowerUsage(Math.sqrt(Math.pow(totalBytes, 0.576D)));
} else if (inv == invItems) {
storedItemCount += added.stackSize;
}
}
if (removed != null) {
if (inv == cell) {
} else if (removed != null) {
totalBytes = 0;
getProxy().setIdlePowerUsage(4d);
} else if (inv == invItems) {
}
} else if (inv == invItems) {
if (added != null) {
storedItemCount += added.stackSize;
}
if (removed != null) {
storedItemCount -= removed.stackSize;
}
}
@@ -279,11 +279,12 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
totalBytes = 0;
getProxy().setIdlePowerUsage(4d);
}
if (inv == invItems) {
storedItemCount -= removed.stackSize;
}
}
case markDirty -> {}
case markDirty -> markDirty();
}
try {