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

Slots player.cursor and horse.chest are interchangeable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.20.5 Pre-Release 1
    • None
    • Confirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            LegoEmmetMC Apollo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: