Please link MC-278088 to this.
Some items do not act synchronously in time after switching items.
Reproduce:
- Prepare 2 different items in hot bar.
- Switch item A to item B.
- Perform the following operations through the item B immediately.
Tested operations:
Attack:
Item A: Fire aspect enchanted wooden sword
Item B: Diamond sword without enchantment
- Spawn a villager and give it fire resistance to prevent fire damage changing the result
- Hold the wooden sword and wait for 100% charge
- Switch to the diamond sword and attack immediately
Result:
/data get entity @n[type=minecraft:villager] Health
The villager takes 100% damage of 4 Not meeting expectations
The villager isn't ignited Meet expectations
Item B 's durability decreases Meet expectations
Attack 2:
Item A: Diamond sword without enchantment
Item B: Fire aspect enchanted wooden sword
- Spawn a villager and give it fire resistance to prevent fire damage changing the result
- Hold the diamond sword and wait for 100% charge
- Switch to the wooden sword and attack immediately
Result:
/data get entity @n[type=minecraft:villager] Health
The villager takes 100% damage of 7 Not meeting expectations
The villager is ignited Meet expectations
Item B 's durability decreases Meet expectations
Drop:
Item A: Diamond sword
Item B: Wooden sword
- Hold the diamond sword
- Switch to the wooden sword and drop immediately
Result:
(This must be tested in survival mode)
The wooden sword in hot bar disappears Meet expectations
But the dropped item on the ground is diamond sword Not meeting expectations
And I click the diamond sword slot, the diamond sword disappears.
I click the wooden sword slot, the wooden sword appears.
Building:
Tested items: dirt and stone, lava bucket and water bucket
Meet expectations
Using:
Tested items: egg and snowball, creeper spawner egg and zombie spawner egg, diamond hoe and wooden shovel
Meet expectations
Predicitons:
In my opinion, when switching items, the game did not reset the player's attack charging in a timely manner, nor did it modify the impact of items on the player's attributes in a timely manner