mojira.dev
MC-218789

Commands including @e[y=(negative number)] include @e regardless of y value

I created a repeating command block with the following text:

/kill @a[y=-100]

In order to skip void damage. This killed all players at all y levels.

I ran a test to check if it was my command or something else.

I placed another repeating command block with this text:

/execute at @a if @p[y=-55]

And I placed a comparator next to it.

The comparator was continually lit no matter what y level I went to. I was the only player in that world.

Attachments

Comments 2

This is not how selectors work; you must specify a dy too to make the field actually matter. See the wiki.

Huh. That's good to know, I guess this isn't a bug then.

I would delete this report but apparently, it's impossible to do so.

The Lego Bros

(Unassigned)

Unconfirmed

(Unassigned)

21w10a

Retrieved