Mojira Archive
MC-63903

SelectedItemSlot is an attribue and not a selector argument

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.

Invalid

[Helper] clam lol

2014-07-26, 11:34 PM

2014-07-27, 12:32 PM

2014-07-27, 12:32 PM

0

1

Unconfirmed

Minecraft 14w30c

-