Detector without filter should detect total storage count, fixes #436

This commit is contained in:
Raoul Van den Berge
2016-10-08 22:16:46 +02:00
parent 51fe0abdb9
commit 40e5433413

View File

@@ -134,7 +134,7 @@ public class TileDetector extends TileNode implements IComparable, IType {
powered = isPowered(stack == null ? null : stack.stackSize);
}
} else {
powered = mode == MODE_AUTOCRAFTING && !network.getCraftingTasks().isEmpty();
powered = mode == MODE_AUTOCRAFTING ? !network.getCraftingTasks().isEmpty() : isPowered(network.getItemStorage().getList().getStacks().stream().map(s -> s.stackSize).mapToInt(Number::intValue).sum());
}
} else if (type == IType.FLUIDS) {
FluidStack slot = fluidFilters.getFluidStackInSlot(0);
@@ -144,7 +144,7 @@ public class TileDetector extends TileNode implements IComparable, IType {
powered = isPowered(stack == null ? null : stack.amount);
} else {
powered = false;
powered = isPowered(network.getFluidStorage().getStacks().stream().map(s -> s.amount).mapToInt(Number::intValue).sum());
}
}
}