Mekanism

Mekanism

111M Downloads

Logistical Sorter size mode not working as expected

ngreatorex opened this issue ยท 1 comments

commented

Firstly, thanks for your great work on this mod! With that out of the way, I think I've found a bug.

I have a chest A and a chest B connected like this:
A --> Logistical Sorter --> Basic Logistical Transporter --> B.

The Logistical Sorter has 1 filter defined in Size mode: Filter config

All works fine when chest B has spare capacity, but when chest B is full or close to full, the Size Mode functionality seems to break.

If chest B is completely full (and chest A has lots of cobblestone still in it) then as expected nothing is sent. If I then remove 32 cobblestone from chest B, I would still expect nothing to be sent as I have defined a minimum of 64 in the filter. However, the sorter immediately sends 32 cobblestone to fill up chest B again.

Interestingly, on trying to reproduce this for this bug report, I discovered that it only happens on the 2nd and subsequent time i.e. if chest B is full of cobblestone when you set this system up, just removing 32 cobblestone will NOT trigger the sorter. However, if you remove a full stack so that it triggers once, and then remove just 32, it will trigger without respecting the minimum size constraint.

I initially discovered this issue with Mekanism 1.7.10-9.1.0.281 but have confirmed it since in 1.10.2-9.2.0.294.

commented

Fixed! I was forgetting to take into account the min stack size when pulling a destination from the path cache.