Slots player.cursor and horse.chest are interchangeable
Despite their entirely different names, player.cursor and horse.chest function exactly the same. You can set the chest of a donkey with player.cursor and detect the player's cursor item with horse.chest.
This also applies to player.crafting.(0-3) with horse.(0-3).
Steps to Reproduce
- Summon a donkey.
- Run the following command on it:
/item replace entity (donkey's uuid) player.cursor with minecraft:chest
- Observe as a chest gets placed in the donkey's chest slot.
- Run the following command on it:
/item replace entity (donkey's uuid) player.crafting.0 with minecraft:stone
- Open the donkey's inventory and observe that the first slot has been replaced with stone.
Code Analysis
Both player.cursor and horse.chest use slot id 499. Both player.crafting.(0-3) and horse.(0-14) start at slot id 500. Shifting the IDs of one set over should fix the issue.
2024-04-12, 05:41 AM
2024-12-10, 05:54 AM
2024-04-15, 08:47 AM
0
2
-