Inventory Tweaks [1.12 only]

Inventory Tweaks [1.12 only]

127M Downloads

Rectangle rules lead to "unstable" sorting

mkalam-alami opened this issue ยท 6 comments

commented

Hi Kobata! I hope you're doing well.

I played a bit of Minecraft recently (1.7.10 + InvTweaks-1.58-147). With my ruleset, pressing multiple times the sorting button toggles between two results:

The complete config is as below, note that if I remove the last two rules the issue disappears, it seems to be specific to the rectangle rules.

D LOCKED

D1 pickaxe
D2 shovel
D3 sword
D4 axe
D9 torch

A1-C5v stuff
A9-C6v blocks

EDIT: No mods other than Forge (13.13.2.1230), InvTweaks & OptiFine.

commented

Confirmed on my 1.8 test instance.

commented

Indeed, and the fact that it chooses A7 over A8 makes this all the more strange.

commented

Currently thinking this is related to 7822d58

I had to 'break' a few things because as it was it had a tendency to get into infinite loops if something couldn't be satisfied.

commented

That's an interesting loop: On the right side with the blocks, it really wants to move the item in A7 to A9, which then makes it move A9 to C9, C9 to B8, and B8 to A7.

commented

I can 'fix' this particular appearance of it easily enough, but I'm not currently sure it won't lead to the infinite loop issue recurring (since the fix requires resetting loops back to an earlier state), and it doesn't seem to do anything about the probably-related instability of horizontal/vertical mode in chests.

commented

That should help -- at least it fixed it in my testing for the inventory case.

In specific situations it may require a few sorts to stabilize due to the infinite loop fix. The strange slot selection was actually a separate bug where it would end up skipping over target slots when continuing the loop with a different item.