Editing
Target selectors
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Selecting targets by NBT data=== {{exclusive|java|section=yes}} :Filter target selection based on the entity's NBT data. The NBT data is written in its [[NBT_format|SNBT format]]. Duplicate nbt arguments are allowed, and all arguments must be fulfilled for an entity to be selected. :See [[NBT format#Testing NBT tags]] for more infomation about this. :Note that this selector argument should be used with care, as accessing NBT data is a heavy process for the CPU. :<code>[nbt=<compoundTag>]</code> β Include only targets with the specified NBT data. :<code>[nbt=!<compoundTag>]</code> β Exclude any targets with the specified NBT data. :*<code>@a[nbt={OnGround:true}]</code> β Select all players on the ground. :*<code>@e[type=sheep,nbt={Color:0b}]</code> β Select all sheep that are dyed white. :*<code><nowiki>@e[type=item,nbt={Item:{id:"minecraft:slime_ball"}}]</nowiki></code> β Selects all slime ball item entities. :*<code>@e[nbt={Tags:[a,b]}]</code> is the same as <code>@e[tag=a,tag=b]</code>. The latter is simpler and reduces CPU load. {{anchor|Selecting targets by advancements}}
Summary:
Please note that all contributions to Kiiw may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Kiiw:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information