[MC-121641] Impossible selector combinations don't fail to build Created: 08/Nov/17  Updated: 01/Feb/18  Resolved: 01/Feb/18

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w49a, Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b, Minecraft 18w05a
Fix Version/s: Minecraft 18w06a

Type: Bug
Reporter: [Mod] tryashtar Assignee: [Mojang] Nathan Adams
Resolution: Fixed Votes: 4
Labels: command, selector

CHK:
Confirmation Status: Confirmed

 Description   

The following examples are all selectors which will successfully build but obviously fail regardless of the surroundings, or which don't make logical sense. Usually the parser should catch these errors beforehand:

  • @e[type=pig,type=cow]
  • @a[gamemode=survival,gamemode=creative]
  • @a[sort=arbitrary,sort=random] (latter sort overrides former here)
  • @a[type=llama] (type should be considered invalid for player selectors, as limit is for @s)


 Comments   
Comment by Elemend [ 06/Jan/18 ]

I'm not entirely sure if it's relevant, but using negative Values for dx,dy and dz also doesn't fail to build:

run tag @e[type=armor_stand,dx=-2,dy=0,dz=-2] add lala

Or did MC-45134 change and it works now? If the parser does get updated in the future, this should be counted as an error too. I mean it doesn't even show up in the launcher_log.txt, whereas the execute subsommand "if entity" here:

execute as @s at @s if entity @e[type=area_effect_cloud,tag=blu] run something...

does give an error that there needs to be only entitiy, so it's necessary to add "limit=1"

Comment by [Mod] tryashtar [ 06/Jan/18 ]

Yeah MC-45134 was fixed. And I'm not getting that error for your provided command, haha

Comment by Elemend [ 07/Jan/18 ]

Was it mentioned anywhere in the changelogs of any snapshots that dx,dy,dz do work with negative values? And apparently I can't recreate that error either, so nevermind that.

Comment by [Mod] tryashtar [ 07/Jan/18 ]

Not sure, but I know it's not a 1.13 change, as negative dxyz worked throughout 1.12.

Comment by [Mod] Skylinerw [ 07/Jan/18 ]

Delta params were introduced early in 1.8 with the statement of them not accepting negative values, but towards the end of 1.8 development that was changed, so it's accepted negative values since 1.8. I also don't know if there was anything in the changelogs about it, but I think there was something said about it on twitter. No idea by who or when, so unfortunately that's not helpful.

Generated at Mon Dec 10 04:30:27 CST 2018 using Jira 7.11.2#711002-sha1:fdc329dee91471a641faabfe39b5ff8c0a5b3f66.