make maintainer read fluid level (#339)

This commit is contained in:
lc-1337 authored and GitHub committed 2025-10-06 15:38:01 +02:00
1 parent 0d91a7dd43
commit ef7a5d4d86
1 file changed
+11 -3
@@ -163,7 +163,8 @@ public class TileLevelMaintainer extends AENetworkTile
try {
final ICraftingGrid craftingGrid = getProxy().getCrafting();
final IGrid grid = getProxy().getGrid();
final IItemList<IAEItemStack> inv = getProxy().getStorage().getItemInventory().getStorageList();
final IItemList<IAEItemStack> invItems = getProxy().getStorage().getItemInventory().getStorageList();
final IItemList<IAEFluidStack> invFluid = getProxy().getStorage().getFluidInventory().getStorageList();
// Check there are available crafting CPUs before doing any work.
// This hopefully stops level maintainers busy-looping calculating
@@ -205,9 +206,16 @@ public class TileLevelMaintainer extends AENetworkTile
}
}
IAEItemStack aeItem = inv.findPrecise(craftItem);
IAEItemStack aeItem = invItems.findPrecise(craftItem);
long stackSize = aeItem == null ? 0 : aeItem.getStackSize();
long stackSize;
if (craftItem.getItem() instanceof ItemFluidDrop) {
IAEFluidStack ifs = invFluid.findPrecise(ItemFluidDrop.getAeFluidStack(craftItem));
stackSize = ifs == null ? 0 : ifs.getStackSize();
} else {
stackSize = aeItem == null ? 0 : aeItem.getStackSize();
}
if (ModAndClassUtil.ThE) {
if (aeItem != null && ThaumicEnergisticsCrafting.isAspectStack(aeItem.getItemStack())) {