Mojira Archive
MC-270664

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.

Won't Fix

Apollo

2024-04-12, 05:41 AM

2024-12-10, 05:54 AM

2024-04-15, 08:47 AM

0

2

Confirmed

(Unassigned)

1.20.5 Pre-Release 1

-