Mojira Archive
MC-224533

Inventory desync when dropping and replacing main hand

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.

Duplicate

bradley qu

2021-04-30, 11:19 AM

2022-08-31, 10:37 AM

2021-07-29, 09:35 PM

0

1

Unconfirmed

(Unassigned)

21w17a

-