I use a 16 item hotbar and if my bar is full and inventory is full (32 items), the mod would switch beautifully, but delete the 15th and 32nd items. AI helped me find the problem in the for i = 1, list_size do loop. This line uses modulo to rotate the inventory, but when (i + from_index) % list_size equals 0, it tries to access list 0, when it should start with 1. That adds nil to the new list deleting the last item of each block. I tweaked it in a personal version (with CoPilot help) and it works a treat. Definitely a new default mod for my game. Thanks for making it!
I use a 16 item hotbar and if my bar is full and inventory is full (32 items), the mod would switch beautifully, but delete the 15th and 32nd items. AI helped me find the problem in the for i = 1, list_size do loop. This line uses modulo to rotate the inventory, but when (i + from_index) % list_size equals 0, it tries to access list 0, when it should start with 1. That adds nil to the new list deleting the last item of each block. I tweaked it in a personal version (with CoPilot help) and it works a treat. Definitely a new default mod for my game. Thanks for making it!
oh i thought i tested for that, i'll try fixing it
okay i think i made a correct fix, now it also supports hotbars of any length