Problems about speaking slots in (crafting) recipe book
Trix in Discord:
Still having issues with the recipe book. It starts out normal, and I can scroll between the items on the first page with the I/J/K/L keys, but when I hit V to go to the next page, and try to scroll around, I'm only hearing the stuff on the first page, and the behaviour I experienced previously with the slots going silent once they've been scrolled over starts again. I can tab away and back and it starts announcing things again, but then suddenly there are fewer slots on the page than there were before, so I think it's moving to the next page but not taking the mouse cursor with it.
I do believe the cause of these issues lay in the fact that:
- The slot layouts of other groups (hotbar, inventory...) are fixed, if one slot has no item, ok that’s an empty
slotinstance. - But the layout of recipe book is dynamic bases on items, if there’s no item, there is no
slotinstances, which will affect the code below. Current implementation hasn’t take this dynamic behavior into account.
https://github.com/khanshoaib3/minecraft-access/blob/be7ba156f5397add1a226db9dd0cbe7c8c8142af/common/src/main/java/com/github/khanshoaib3/minecraft_access/features/inventory_controls/InventoryControls.java#L490-L512
Currently the logic about speaking of recipe book slots is in AnimatedResultButtonMixin, while relative logic of other groups in InventoryControls, I'm not sure how to combine the two together, or at least fix the behavior with some extra if conditions.
It's fine if there is only one page.
What I've observed (1.20.1, Fabric):
- Move cursor to the end of first page, go to next page which has not enough slots, then you "break" the boundary check.
I think I remember there being a function to get the tooltip text at a point on the current screen, maybe we can use that? Although I don't remember if I've already tried that before.