mojira.dev
MC-248511

Unable to filter charged/normal creepers using commands

Typing /kill @e[nbt={Powered:0}]
does not do antyhing. This command should kill all the creepers who are not charged.

Comments 1

  1. The NBT key has no capitals (so "powered")

  2. The NBT is a byte (so 0b/1b, not 0/1, those will never succeed in tests unless the NBT is an int.)

  3. See MC-87252. Use nbt=!{powered:1b} to target uncharged ones as the tag is optional and will not exist if the default value (0b) is used, as such testing for it being 0b won't succeed.

Vilius

(Unassigned)

Unconfirmed

(Unassigned)

command, command-bug, commands

1.18.1, 22w05a

Retrieved