If you’re in creative mode and middle-click to pick a block, you get the item you’re looking at. That’s simple. But if you remove the item and try to middle-click again, it’ll act like it’s still in your hotbar and move the hotbar to the slot where it originally was.
Environment
Using a Curseforge mod loader
Please note that modified versions are not supported here.