Swapping off-hand item to locked hotbar slot
OkinawaGaijin opened this issue · 5 comments
Hello,
First, great mod. But I've discovered a small issue.
When you try to swap an item from the left-hand to an empty (but locked) hotbar slot via the F key, it just jitters and goes right back into the hand.
This does not happen if the item in question was first manually put in that locked hotbar slot, then picked into the off-hand via F-key and then swapped back into that same slot. But if a locked slot was empty before you try the swap, it won't allow the item to be placed there.
For example, have a pickaxe in a locked hotbar 1, and have an empty hotbar 2 also locked. If you take the pickaxe in your left hand using the f key, you can put it back into hotbar 1 without an issue. But if you scroll over to the empty locked hotbar 2 slot and try to place the pickaxe with f, it won't allow it.
I use the "false" setting on "enable picking items into empty locked slots" and keep the hotbar locked, because I don't want all blocks and plants to automatically end up on the hotbar on pickup.
And I generally keep a lamp or torch in my off-hand through the night and keep one hotbar slot empty to put it there during the day (because I want to stop using a dynamic light in a raytracing shader if I don't need it for the 1 FPS more)
It would be useful if the item swap using the F-key could ignore the lock rule to allow an empty locked slot to be reserved for the held off-hand item.
Hi,
Yeah I know about this. The main problem is detecting that I was the user that caused the change. Picking up an item off the ground is indistinguishable from swapping the offhand.
The other instances where user actions don't cause this problem rely either on circumstantial evidence or some hook into minecraft code. Finding those is annoying and honestly I was waiting for someone to complain before spending the time 🤣.
It's really a fringe case.
I noticed that when I put the lamp in let's say Slot 7 and swap it back to that one, there is no issue, I think. Just when I then accidentally (or unknowingly) try to place it into slot 8, the lock will block it. So knowing this, I can just make sure to put it back into the slot I reserved for it, and not just any random slot that happens to be empty right then and there.
But once I try to fit it into a different empty locked slot from the one that remembers that an item was there, all empty slots will get locked, even the one that allowed the swap before. Then manually putting it in a slot will allow to swap it in the hand and back to the original slot again. So it's really weird behavior
I just thought I should mention it, but it's not a pressing issue. I just had to learn to work around it. Still better than ending up with leaves and saplings in my empty hotbar every time I go cut a tree 😂
That's ingenious. I'll give it a try next time I hop in. Thanks again for even spending time on this, as it's not really an objective issue.
fixed in 4accac6