- distance: To test the distance to the entity this predicate is invoked upon. Passes if the calculated distance is between the entered
minandmax, inclusive.- absolute: Test the distance between the two points in 3D space.
- max
- min
- horizontal: Test the distance between the two points, ignoring the Y value.
- max
- min
- x: Test the absolute difference between the X-coordinates of the two points.
- max
- min
- y: Test the absolute difference between the Y-coordinates of the two points.
- max
- min
- z: Test the absolute difference between the Z-coordinates of the two points.
- max
- min
- absolute: Test the distance between the two points in 3D space.
- effects: For testing the active status effects on the entity.
- <minecraft:effect_name>: A status effect that must be present.
- ambient: Test whether the effect is from a beacon.
- amplifier: Test if the effect's amplifier matches an exact value. Level I is represented by 0.
- amplifier: Test if the effect amplifier falls within a range of values. Level I is represented by 0.
- max
- min
- duration: Test if the effect's remaining time (in ticks) matches an exact value.
- duration: Test if the effect's remaining time (in ticks) is between two numbers, inclusive.
- max
- min
- visible: Test if the effect has visible particles.
- <minecraft:effect_name>: A status effect that must be present.
- equipment: For testing the items that this entity holds in its equipment slots.
- mainhand: Test the item in the entity's main hand.
- All possible conditions for items
- offhand: Test the item in the entity's offhand.
- All possible conditions for items
- head: Test the item in the entity's head armour slot.
- All possible conditions for items
- chest: Test the item in the entity's chest armour slot.
- All possible conditions for items
- legs: Test the item in the entity's legs armour slot.
- All possible conditions for items
- feet: Test the item in the entity's feet armour slot.
- All possible conditions for items
- mainhand: Test the item in the entity's main hand.
- flags: To test flags of the entity.
- is_baby: Test whether the entity is or is not a baby variant.
- is_on_fire: Test whether the entity is or is not on fire.
- is_sneaking: Test whether the entity is or is not sneaking.
- is_sprinting: Test whether the entity is or is not sprinting.
- is_swimming: Test whether the entity is or is not swimming.
- location: Test properties of this entity's location.
- Tags common to all locations
- nbt: Test NBT data of this entity. The outer braces
{ }of the NBT must be included within this string. Additional care is required if the NBT contains quotation marks" ", as they must be escaped with a backslash before each:\" - passenger: Test the entity directly riding this entity.
- All possible conditions for entities
- stepping_on: Test properties of the block the entity is standing on, using a location predicate.
- Tags common to all locations
- team: Passes if the team of this entity matches this string.
- type: Test this entity's type. Accepts an entity ID.
- targeted_entity: Test properties of the entity which this entity is targeting for attacks.
- All possible conditions for entities
- vehicle: Test properties of the vehicle entity that this entity is riding upon.
- All possible conditions for entities
- type_specific: To test entity properties that can only be applied to certain entity types. Supersedes
lightning_bolt,player,fishing_hookandcatType.- type: Dictates which type-specific properties to test for.
The possible values for type and associated extra contents:
- any
- No other fields.
- cat
- variant: A resource location specifying a cat variant. Valid values are
minecraft:all_black,minecraft:black,minecraft:british,minecraft:calico,minecraft:jellie,minecraft:persian,minecraft:ragdoll,minecraft:red,minecraft:siamese,minecraft:tabby, orminecraft:white.
- variant: A resource location specifying a cat variant. Valid values are
- fishing_hook: Test properties of the fishing hook that just got reeled in by this entity.
- in_open_water: Whether the fishing hook was in open water.
- frog
- variant: A resource location specifying a frog variant. Valid values are
minecraft:cold,minecraft:temperate, orminecraft:warm.
- variant: A resource location specifying a frog variant. Valid values are
- lightning: To check information about this lightning bolt; fails when entity is not a lightning bolt.
- blocks_set_on_fire: Test if the number of blocks set on fire by this lightning bolt matches an exact value.
- blocks_set_on_fire: Test the number of blocks set on fire by this lightning bolt is between a minimum and maximum value.
- max
- min
- entity_struck: Test the properties of entities struck by this lightning bolt. Passes if at least one of the struck entities matches the entered conditions.
- All possible conditions for entities
- player: Tests properties unique to players; fails when this entity is not a player.
- looking_at: Test properties of the entity that this player is looking at, as long as it is visible and within a radius of 100 blocks. Visibility is defined through the line from the player's eyes to the entity's eyes, rather than the direction that the player is looking in.
- All possible conditions for entities
- advancements: To test the player's advancements.
- <advancement id>: Test whether an advancement is granted or not granted. Key is an advancement ID, value is
trueorfalseto test for granted/not granted respectively. - <advancement id>: Test whether specific criterions of an advancement are marked as complete.
- <criterion id>: Key is one of the criteria of the advancement, value is
trueorfalseto test for completed/not completed respectively.
- <criterion id>: Key is one of the criteria of the advancement, value is
- <advancement id>: Test whether an advancement is granted or not granted. Key is an advancement ID, value is
- gamemode: Test the game mode of this player. Valid values are
survival,creative,adventureandspectator. - level: Test if the experience level of this player matches an exact value.
- level: Test if the experience level of this player is between
minandmaxvalues, inclusive.- max
- min
- recipes: To test if recipes are known or unknown to this player.
- <recipe id>: Key is the recipe ID; value is
trueorfalseto test for known/unknown respectively.
- <recipe id>: Key is the recipe ID; value is
- stats: To test this player's statistics.
- A statistic to test.
- type: The statistic type. Valid values are
minecraft:custom,minecraft:crafted,minecraft:used,minecraft:broken,minecraft:mined,minecraft:killed,minecraft:picked_up,minecraft:droppedandminecraft:killed_by. - stat: The statistic ID to test.
- value: Test if the value of the statistic matches an exact number.
- value: Test if the value of the statistic is between
minandmaxvalues, inclusive.- max
- min
- type: The statistic type. Valid values are
- A statistic to test.
- looking_at: Test properties of the entity that this player is looking at, as long as it is visible and within a radius of 100 blocks. Visibility is defined through the line from the player's eyes to the entity's eyes, rather than the direction that the player is looking in.
- slime
- size: Test if the size of this slime matches an exact value.
- size: Test if the size of this slime is between
minandmaxvalues, inclusive.- max
- min
- type: Dictates which type-specific properties to test for.
- distance: To test the distance to the entity this predicate is invoked upon. Passes if the calculated distance is between the entered
Advertisement
Advertisement