mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-26 14:25:20 +00:00
Fix cell math for distribution card (#751)
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
This commit is contained in:
1 parent
4f05d24560
commit
ddc21fc8cc
1 file changed
+2
-3
@@ -579,10 +579,9 @@ public class CellInventory implements ICellInventory {
|
||||
if (types == 0) types = this.getTotalItemTypes();
|
||||
if (l != null) {
|
||||
if (restrictionLong > 0) {
|
||||
remaining = Math.min((restrictionLong / types) - l.getStackSize(), this.getUnusedItemCount());
|
||||
remaining = Math.min((restrictionLong / types) - l.getStackSize(), getRemainingItemCount());
|
||||
} else {
|
||||
remaining = (((this.getTotalBytes() / types) - (int) Math.ceil((double) l.getStackSize() / 8)
|
||||
- getBytesPerType()) * 8) + (8 - l.getStackSize() % 8);
|
||||
remaining = (((getTotalBytes() / types) - getBytesPerType()) * 8) - l.getStackSize();
|
||||
}
|
||||
} else {
|
||||
if (restrictionLong > 0) {
|
||||
|
||||
Reference in new issue
Block a user