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 volume=== : <code>[dx=<value>,dy=<value>,dz=<value>]</code> β Filter target selection based on their x-difference, y-difference, and z-difference from some point, as measured by entities' hitboxes {{in|java}} or by their feet {{in|bedrock}}. Cannot duplicate any one of these three arguments. : This can be interpreted as creating a rectangular volume defined by an initial position (<x>,<y>,<z>) and diagonal vector (<dx>,<dy>,<dz>), then selecting all entities whose hitboxes are at least partially contained by that volume {{in|java}}, or whose feet are within that volume {{in|bedrock}}. If the positional arguments are left out, the selection is interpreted as originating from the position of the command's execution. Any values are allowed, including signed and fractional numbers. : Note that <code>dx</code>,<code>dy</code>,<code>dz</code> specify ''signed differences'' from the given coordinate. They do not specify a separate coordinate, nor do they extend in both the positive and negative directions. : Additionally, when any volume argument is present, the rest are assumed to equal zero unless otherwise defined. : Examples {{in|java}}: :* <code>@e[x=1,dx=4,y=2,dy=5,z=3,dz=6]</code> β Select all entities whose hitbox collides with the block region (1~5, 2~7, 3~9) (or, mathematically speaking, the region that is {(x,y,z)βR<sup>3</sup>|xβ[1.0,5.0),yβ[2.0,7.0),zβ[3.0,9.0)}). :* <code>@e[x=1,y=2,z=3,dx=0,dy=0,dz=0]</code> β Select all entities whose hitbox contains the point (1,2,3). : Examples {{in|bedrock}}: :* <code>@e[x=1,dx=4,y=2,dy=5,z=3,dz=6]</code> β Select all entities whose feet are within the block region (1~5, 2~7, 3~9). :* <code>@e[x=1,y=2,z=3,dx=0,dy=0,dz=0]</code> β Select all entities whose feet contains the point (1, 2, 3). : It is possible to combine selection by distance and selection by volume, in which case the command select targets only within the overlap of both regions (within a certain radius of the volume's initial point and not outside the defined volume).
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