mojira.dev
MC-297508

Items in offhand doesn't consistently update when players swap item with offhand from containers in server.

Requirements

  1. In server.

  2. When players swap item with offhand from containers.

  3. Clear item in command block or datapack.

How to reproduce

  1. Open a minecraft 1.12.5 server and join in.

  2. Put a container. (either chest or barrel or hopper or others)

  3. Put a repeating_command_block and input 'clear @p stone'. (for example)

  4. Use ‘/item replace block x y z container.0 with stone’ to put a stone in the container.

  5. Use keybind <key.swapOffhand> to swap the stone to player’s offhand.

  6. You can see the stone still in your 'weapon.offhand' slot.

  7. If you are in creative mode, the stone will disappear when you open your inventory.

  8. If you are in survival mode or adventure mode, the stone will disappear when you pick it up.

  9. In all mode, the stone will disappear when you disconnect the server and rejoin, or you use keybind <key.swapOffhand> to swap the stone to hotbar.

Tips: In server process, I can found that the stone has been cleared already. But it still appeared in player’s offhand.

Expected Result

The normal phenomenon should be that when I swap the item which should be clear by command block or datapack, it should be cleared and disappeared.

Anyway, I guess it’s a display bug in offhand slot.

Linked issues

Comments 2

Hi there!

I'm currently reviewing older, unconfirmed reports to help keep the bug tracker up to date. I’ll temporarily resolve this as Awaiting Response for now.

Please let me know if this issue is still happening for you in Minecraft 1.21.6. If you reply, the ticket will automatically reopen and I’ll be happy to take another look.

Thank you for your report!
We're resolving and linking this ticket forward as a duplicate of MC-302297, as that ticket contains more detailed information and/or has already been triaged by Mojang.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

yt_xiaoyu

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5

Retrieved