Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-224533

Inventory desync when dropping and replacing main hand

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 21w17a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      Replaced mainhand when mainhand is dropped using repeating command blocks or functions

      What I expected to happen was...:
      item is dropped and main hand is replaced

      What actually happened was...:
      on client, item is dropped but main hand is empty
      on server, item is dropped and main hand is replaced

      Steps to Reproduce:
      1. set up command block chain
      2. command1: execute if entity @e[type=item,nbt=\{Item:{id:"minecraft:wooden_pickaxe"}}] run item entity @p weapon.mainhand replace minecraft:wooden_pickaxe

      3. command2: kill @e[type=item,nbt=\{Item:{id:"minecraft:wooden_pickaxe"}}]
      4. get a wood pickaxe, drop and observe

       

      command2 simply exists to ensure item replace only occurs once. this can also be done through other means.

        Attachments

        1. repro.mov
          8.21 MB
          bradley qu

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              thebradqq bradley qu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: