Vivecraft_114 icon indicating copy to clipboard operation
Vivecraft_114 copied to clipboard

Shift-clicking while holding item

Open jrbudda opened this issue 5 years ago • 2 comments

User reports shift-clicking on an itemstack works normally, but shift-clicking while holding an itemstack with the cursor does not behave the same as vanilla.

jrbudda avatar Oct 25 '19 15:10 jrbudda

Specifically, the user (not me) has said that holding an itemstack with the cursor makes Vivecraft ignore the "Shift" when Shift-clicking on another itemstack.

ZwipZwapZapony avatar Oct 25 '19 15:10 ZwipZwapZapony

Alright so I've actually been able to reproduce this 'issue' in vanilla, it's not really a vivecraft bug so much as an oversight in the base game. The problem is the conflict with normal 'shift-clicking' and the 'drag-splitting' mechanic minecraft has. Try the following in vanilla:

Left click to pick up a stack Right click an empty slot a few times to place some of the stack Hold shift Press left click and hold it Move the mouse slightly (you'll see the item stack in the hovered slot disappear) Release left click

Your held itemstack will now merge with the hovered one, appearing as if you simply left-clicked, instead of moving into the container.

What's happening under the hood is if, while either mouse button is 'down' (and the cursor is holding an item), the game receives a 'mouse dragged' event from the input system. the container UI turns on 'drag splitting' mode, which disables the quick-move click type.

So holding item + shift + mouse press + mouse release = quick move but holding item + shift + mouse press + mouse drag + mouse release = drag split

Clearly what's happening is its physically very difficult to click and release a VR controller without moving the cursor slightly. It also might be logically impossible for the game not to receive a drag event depending on how we coded the input injector.

I'm not sure how to go about 'fixing' this, doing something to the input injector to constrain drag events might affect the rest of the game somehow, and fiddling with the container logic might also break things. We'll have to look this over carefully.

jrbudda avatar Oct 25 '19 18:10 jrbudda