When middle-clicking a block with the hotbar full, the replaced slot depends on the currently equiped item (block or tool). For a block, the current slot is replaced and for an ENCHANTED item the (presumably) rightmost slot not containing an enchanted item is selected. This mechanic is usefull to be able to pick bloc without having to replace items that are always on the hotbar for quick access (sword, pickaxe, bow...) BUT the problem is this only applies on enchanted items creating situation where a skeleton shows on your hardcore survival and you have no more sword on your hotbar.
Maybe this is intended as this mechanic exists since at least 1.14 but it really breaks the picking block feature in survival.
Linked issues
Attachments
Comments 2
Thank you for your report!
We're tracking this issue in MC-224072, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Cause is {{Inventory#getSuitableHotbarSlot}}, which first scans the hotbar for an empty slot, then explicitly looks for any unenchanted item