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

SelectedItemSlot is an attribue and not a selector argument

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 14w30c
    • None
    • OS X 10.8.5
    • Unconfirmed

      To reproduce:
      1) Open up/create a cheats world
      2) Make a redstone clock which powers two command blocks every so often. 16-tick delay is fine.
      3) Put in one command block:

      /testfor @e[type=Player,r=60,m=2] {SelectedItemSlot: 1}
      

      4) Place a comparator coming off of that command block
      5) Place in the other command block:

      /execute @e[type=Player,r=60,m=2] {SelectedItemSlot: 1} ~ ~ ~ /effect @a[r=6,m=2] minecraft:speed 1 0 true
      

      6) Set yourself to Adventure Mode
      7) Select the second-to-left slot in your hotbar

      You'll notice that the comparator gets powered when you select the hotbar slot second from left, but you don't gain Speed. This is because /execute doesn't recognize attributes after the selector arguments (type, player, and m) and before the ~'s.In my view, this is a problem with SelectedItemSlot being an attribute and not a selector argument like type, m, or r. It'd be more fitting if SelectedItemSlot could go with the other selector arguments, making the command:

      /execute @e[type=Player,r=60,m=2,SelectedItemSlot=1] ~ ~ ~ /effect @a[r=6,m=2] minecraft:speed 1 0 true
      

      So not really a bug, but more of a formatting error which prevents SelectedItemSlot from being used to its full potential.

            Unassigned Unassigned
            clamlol [Helper] clam lol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: