mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-10-25 20:22:20 +00:00
replenisher fixes, 2.8 2.9 (#373)
This commit is contained in:
1 parent
b95dc4df18
commit
93688313e6
1 file changed
+12
-11
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user