Functional Storage

Functional Storage

31M Downloads

[1.21] Pusher an puller upgrades don't work in compacting drawers or simple compacting drawers

Nideau opened this issue ยท 3 comments

commented

Functional Storage Version:1.21.1-1.4.2

Titanium Version:1.21-4.0.34

Pusher an puller upgrades don't work in compacting drawers or simple compacting drawers

Example

In ATM 10 I'm trying to make a column of Compacting drawers of cobble up to cobble 9x

Image

the pusher upgrade direction up in the bottom compacting drawer don't work

the puller upgrade direction down in the top compacting drawer don't work either

commented

After testing, push/pull upgrade only takes the slot at index 0 (usually the bottom right corner) as the source/target.
Also encountered with 1x2 or 2x2 drawers.

commented

for (int sourceSlot = 0; sourceSlot < source.getSlots(); sourceSlot++) {
ItemStack pulledStack = source.extractItem(sourceSlot, itemsPerOperation, true);
if (pulledStack.isEmpty()) continue;
for (int destinationSlot = 0; destinationSlot < destination.getSlots(); destinationSlot++) {
if (destination.getStackInSlot(destinationSlot).getCount() >= destination.getSlotLimit(destinationSlot))
continue;
ItemStack simulated = destination.insertItem(destinationSlot, pulledStack, true);
if (simulated.getCount() <= pulledStack.getCount()) {
destination.insertItem(destinationSlot, source.extractItem(sourceSlot, pulledStack.getCount() - simulated.getCount(), false), false);
return;
}
}
}

L40, changing <= to < may fix it.

commented

Yeah, just noticed the problem today.
In this example, the Drawer is only accepting the items that match the bottom drawer, in this case the Gems instead of the Blocks.
Image