[1.12] Middle-Click Disables Carrying
officialMECH opened this issue ยท 6 comments
If you middle click a block in the overworld that is also in your inventory, the game will free your movements that were locked by carrying the block/entity. This will give the ability to view/interact with the carryon:entity_item
/<carryon:tile_item>
in your inventory (storing in chests, renaming in Anvil). There is a possible exploit for infinite storage / storage of entities.
Still able to reproduce the bug with v1.4.1, and there is extremely bad behavior with the fix you made. If the hotbar is completely filled with items and you middle-click a block while carrying a tile, the block still replaces the tile item with the block. When you delete the item however, the scrolling lock you added remains locked even without the tile item. The only way to scroll the hotbar in this state is by carrying another tile or entity and refreshing the actions.
Ok, but this only happens on creative mode, right?
And how is it still possible to dislocate the item from your hotbar?
Execute /carryon clear to unlock the hotbar
I did test it, and yes it does happen in survival. The way it works in survival is that if the block you middle-click is located anywhere in your inventory, the tile item in the selected slot will be replaced with the block you middle-click, but only when that block is in your inventory. In creative, regardless of whether it is located in the inventory or not, it will create the block and replace the selected slot.
My suggestion is to disable the "Pick Block" (MOUSE3 by default) key entirely in the carrying state, since that is what causes the slot to be replaced.
That was the original plan. But I ran into problems, I can't use the same method I used for cancelling keys like drop & switch hands, because pick block is on the mouse (by default). If it was on the keyboard, I could use the same method. That's why I did this workaround, but I agree, it's not clean. I'm gonna see if I can do something else...