Skip to main content

Entity Condition Types

Entity conditions check the state of an entity.

origins:ability

Checks if the player has a specific ability (e.g. invulnerable, mayfly).

FieldTypeDefaultDescription
abilityStringrequiredAbility: flying, instabuild, invulnerable, may_build, mayfly
Example
"condition": {
"type": "origins:ability",
"ability": "minecraft:mayfly"
}

This example will check if the player can fly in a Creative Mode-like fashion.

origins:advancement

Checks if an advancement has been granted.

FieldTypeDefaultDescription
advancementIdentifierrequiredAdvancement ID
Example
"condition": {
"type": "origins:advancement",
"advancement": "minecraft:story/smelt_iron"
}

This example will check if the player has the minecraft:story/smelt_iron advancement, obtained by smelting their first Iron Ingot.

origins:air

Checks the entity's remaining air.

FieldTypeDefaultDescription
comparisonStringrequired==, !=, <, <=, >, >=
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:air",
"comparison": "==",
"compare_to": 0
}

This example will check if the player has no breath / air / bubbles left.

origins:attack_cooldown

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Compares a player's current attack cooldown progress.

origins:attack_cooldown

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Compares a player's current attack cooldown progress.

origins:attack_target_condition

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether a mob has an attack target.

FieldTypeDefaultDescription
None---

origins:attacker_condition

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether a living entity has a most recent mob attacker.

FieldTypeDefaultDescription
None---

origins:attribute

Checks an entity's attribute value.

FieldTypeDefaultDescription
attributeIdentifierrequiredAttribute ID
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:attribute",
"attribute": "minecraft:generic.armor",
"comparison": ">=",
"compare_to": 10.0
}

This example will check if the entity's armor attribute is 10 or more.

origins:biome_in

Checks if the entity is in one of the specified biomes.

FieldTypeDefaultDescription
biomeIdentifier or ListoptionalBiome ID(s)
biomesList of IdentifieroptionalAlternative biome list
conditionBiome ConditionoptionalBiome condition to evaluate
Example
"condition": {
"type": "origins:biome_in",
"biome": "minecraft:plains"
}

This example will check if the entity is currently in a Plains biome.

origins:block_collision

Checks for block collision at an offset from the entity.

FieldTypeDefaultDescription
offset_xFloat0.0X offset
offset_yFloat0.0Y offset
offset_zFloat0.0Z offset
Example
"condition": {
"type": "origins:block_collision",
"offset_x": 0.1,
"offset_z": 0.1
}

This example will check if the entity is colliding with the positive X or Z faces of a block.

origins:block_in_radius

Checks for blocks matching a condition within a radius of the entity.

FieldTypeDefaultDescription
block_conditionBlock ConditionoptionalCondition for matching blocks
radiusIntegerrequiredSearch radius
shapeStringcubecube or sphere
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:block_in_radius",
"block_condition": {
"type": "origins:in_tag",
"tag": "origins:natural_stone"
},
"radius": 1,
"shape": "cube",
"comparison": ">=",
"compare_to": 4
}

This example will check if 4 or more blocks that is included in the #origins:natural_stone block tag is within a 1 block radius relative from the entity.

origins:brightness

Checks the light level at the entity's eyes.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:brightness",
"comparison": "<=",
"compare_to": 0.5
}

This example will check if brightness is 0.5 or lower (light level of 11 or below).

origins:can_have_effect

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether a living entity can be affected by the specified status effect.

FieldTypeDefaultDescription
effectIdentifierrequiredStatus effect to test

origins:climbing

Checks whether the entity is currently climbing.

origins:collided_horizontally

Checks if the entity is colliding horizontally with a wall.

origins:command

Checks if a command returns a specific result.

FieldTypeDefaultDescription
commandStringrequiredCommand to execute
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against

origins:creative_flying

Checks if the player is Creative Mode flying.

origins:daytime

Checks whether it's currently daytime.

origins:dimension

Checks the entity's current dimension.

FieldTypeDefaultDescription
dimensionIdentifierrequiredDimension ID
invertedBooleanfalseIf true, inverts the result
Example
"condition": {
"type": "origins:dimension",
"dimension": "minecraft:the_nether"
}

This example will check if the entity is in the Nether dimension.

origins:distance_from_coordinates

Checks the entity's distance from a set of coordinates.

FieldTypeDefaultDescription
xFloat0Reference X
yFloat0Reference Y
zFloat0Reference Z
comparisonStringrequiredComparison operator
compare_toFloatrequiredDistance to compare against
Example
"condition": {
"type": "origins:distance_from_coordinates",
"x": 256,
"y": 64,
"z": 32,
"comparison": "<",
"compare_to": 8
}

This example will check if the entity is within 8 blocks of (256, 64, 32).

origins:elytra_flight_possible

Checks if elytra flight is currently possible for the entity.

Example
"condition": {
"type": "origins:elytra_flight_possible",
"check_state": true,
"check_abilities": true
}

This example will check if the player can activate elytra flight.

origins:enchantment

Checks if an equipped item has a specific enchantment.

FieldTypeDefaultDescription
enchantmentIdentifierrequiredEnchantment ID
calculationStringsumsum or max: how to combine enchantment levels across items
comparisonStringrequiredComparison for level
compare_toIntegerrequiredLevel to compare against
Example
"condition": {
"type": "origins:enchantment",
"enchantment": "minecraft:protection",
"calculation": "sum",
"comparison": ">=",
"compare_to": 16
}

This condition will check whether the entity is wearing a full set of Protection IV armor (or better, which might be possible with mods).

origins:entity_in_radius

Checks for entities matching a condition within a radius of the entity.

FieldTypeDefaultDescription
entity_conditionEntity ConditionoptionalCondition for matching entities
radiusIntegerrequiredSearch radius
shapeStringcubecube or sphere
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against

origins:entity_type

Checks the entity's type.

FieldTypeDefaultDescription
entity_typeIdentifierrequiredEntity type ID
Example
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:creeper"
}

This example will check if the entity is a Creeper.

origins:equipped_item

Checks an item equipped in a specific slot.

FieldTypeDefaultDescription
equipment_slotEquipment SlotrequiredSlot to check
item_conditionItem ConditionrequiredItem condition
Example
"condition": {
"type": "origins:equipped_item",
"equipment_slot": "mainhand",
"item_condition": {
"type": "origins:harvest_level",
"comparison": ">=",
"compare_to": 2
}
}

This example will check if the item in the entity's mainhand has a harvest level of 2 or more.

origins:exists

Checks if the entity exists.

origins:exposed_to_sky

Checks if the entity is exposed to the sky.

origins:exposed_to_sun

Checks if the entity is exposed to sunlight.

origins:fall_distance

Checks the entity's fall distance.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:fall_distance",
"comparison": ">=",
"compare_to": 4
}

This example will check if the entity has been falling for 4 or more blocks.

origins:fall_flying

Checks whether the entity is currently fall flying (with an Elytra, an Elytra power, or similar).

origins:fluid_height

Checks the height of fluid the entity is submerged in.

FieldTypeDefaultDescription
fluidIdentifierrequiredFluid ID filter
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:fluid_height",
"fluid": "minecraft:lava",
"comparison": "==",
"compare_to": 0
}

This example will check if the entity is not touching a lava fluid.

origins:food_level

Checks the entity's food level.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:food_level",
"comparison": "==",
"compare_to": 0
}

This example will check if the player have 0 hunger shanks (or 0 food points).

origins:gamemode

Checks the player's game mode.

FieldTypeDefaultDescription
gamemodeStringrequiredGame mode: survival, creative, adventure, spectator
Example
"condition": {
"type": "origins:gamemode",
"gamemode": "creative"
}

This example will check if the player is in Creative Mode.

origins:glowing

Checks if the entity is glowing.

origins:grounded

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the entity is on the ground.

FieldTypeDefaultDescription
None---

origins:health

origins:hostile

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the entity implements Minecraft's hostile-mob interface.

FieldTypeDefaultDescription
None---

Checks the entity's current health.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:health",
"comparison": "<",
"compare_to": 20
}

This example will check if the entity's health is less than 10 hearts (or 20 health points).

origins:in_block

Checks if the entity's hitbox intersects a specific block.

FieldTypeDefaultDescription
block_conditionBlock ConditionrequiredBlock condition
Example
"condition": {
"type": "origins:in_block",
"block_condition": {
"type": "origins:block",
"block": "minecraft:grass"
}
}

This example will check if Grass (foliage) is currently overlapping the entity's feet.

origins:in_block_anywhere

Checks if any block matching a condition exists within the entity's bounding box.

FieldTypeDefaultDescription
block_conditionBlock ConditionrequiredBlock condition
comparisonStringrequiredComparison operator
compare_toIntegerrequiredMinimum number of matching blocks
Example
"condition": {
"type": "origins:in_block_anywhere",
"block_condition": {
"type": "origins:in_tag",
"tag": "minecraft:flowers"
},
"comparison": ">",
"compare_to": 1
}

This example will check if the entity is currently inside a two-block tall foliage block that belongs in the #minecraft:flowers (data\minecraft\tags\blocks\flowers.json) block tag. An example is the rose bush block.

origins:in_rain

Check if it's raining at the entity's position.

origins:in_snow

Checks if it's snowing at the entity's position.

origins:in_tag

Checks if the entity is in an entity type tag.

FieldTypeDefaultDescription
tagIdentifierrequiredEntity type tag ID

origins:in_thunderstorm

Checks if there's a thunderstorm at the entity's position.

origins:inventory

Checks the entity's inventory contents.

FieldTypeDefaultDescription
item_conditionItem ConditionoptionalItem condition
slotList of IntegeroptionalSlots to check
process_modeStringstacksstacks or items
powerIdentifieroptionalPower whose inventory to check
comparisonStringrequiredComparison for matching count
compare_toFloatrequiredCount to compare against
Example
"condition": {
"type": "origins:inventory",
"process_mode": "stacks",
"comparison": ">=",
"compare_to": 10
}

This example will check if 10 or more slots are occupied by any items in the entity's inventory.

origins:invisible

Checks whether the entity is currently invisible.

origins:living

Checks if the entity is an instance of LivingEntity, or in simple terms, a mob or a player.

origins:mob_effect

Checks if a specific status effect is active.

FieldTypeDefaultDescription
effectIdentifierrequiredEffect ID
min_amplifierInteger0Minimum amplifier
max_amplifierInteger2147483647Maximum amplifier
min_durationInteger-1Minimum remaining duration ticks
max_durationInteger2147483647Maximum remaining duration ticks
invertedBooleanfalseIf true, checks the effect is NOT active

origins:moving

Checks whether the entity is currently moving.

origins:nbt

Checks the entity's NBT data.

FieldTypeDefaultDescription
nbtNBT ObjectrequiredNBT data to match against the entity

origins:on_block

Example
"condition": {
"type": "origins:on_block"
}

This example will check if the entity is currently on the ground.

Checks if the entity is standing on a block (not in the air).

FieldTypeDefaultDescription
block_conditionBlock ConditionoptionalCondition on the block being stood on

origins:on_fire

Checks if the entity is on fire.

origins:origin

Checks the entity's origin.

FieldTypeDefaultDescription
originIdentifierrequiredOrigin ID
layerIdentifieroptionalLayer ID
Example
"condition": {
"type": "origins:origin",
"origin": "origins:phantom",
"layer": "origins:origin"
}

This example will check if the entity has the origins:phantom origin on the default layer.

origins:passenger

Checks if the entity has a matching passenger.

FieldTypeDefaultDescription
conditionBi-entity ConditionoptionalBi-entity condition for the passenger
comparisonComparisonrequiredComparison with count of matching passengers
recursiveBooleanoptionalWhether to check recursively
Example
"condition": {
"type": "origins:passenger",
"bientity_condition": {
"type": "origins:actor_condition",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:player"
}
}
}

This example will check if the target entity is being ridden by a player (actor entity).

origins:passenger_recursive

Recursively checks passengers.

FieldTypeDefaultDescription
conditionEntity ConditionoptionalCondition at each level
Example
"condition": {
"type": "origins:passenger_recursive",
"bientity_condition": {
"type": "origins:actor_condition",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:armor_stand"
}
},
"comparison": ">=",
"compare_to": 2
}

This example will check if the target entity is being ridden by an armor stand that is also being ridden by an armor stand (and so on).

origins:power_active

Checks if a specific power is active.

FieldTypeDefaultDescription
powerIdentifierrequiredPower ID
Example
"condition": {
"type": "origins:power_active",
"power": "origins:primary_key"
}

This example will check if the origins:primary_key power is currently active.

origins:power_type

Checks if the entity has a power of a specific type active.

FieldTypeDefaultDescription
power_typeIdentifierrequiredPower type ID
Example
"condition": {
"type": "origins:power_type",
"power_type": "origins:active_self"
}

This example will check if the entity has a power that uses the Active Self (Power Type).

origins:predicate

Checks against a predicate defined in the data pack.

FieldTypeDefaultDescription
predicateIdentifierrequiredPredicate resource location
Example
"condition": {
"type": "origins:predicate",
"predicate": "example:weather/is_thunderstorm"
}

This example will check if the example:check_if_thunderstorm predicate (data\example\predicates\weather\is_thunderstorm.json) is true.

origins:raining

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether it is currently raining in the entity's level.

FieldTypeDefaultDescription
None---

origins:raycast

Performs a raycast and checks for matching entities/blocks.

FieldTypeDefaultDescription
distanceFloatrequiredRaycast distance
block_conditionBlock ConditionoptionalBlock to match
entity_conditionEntity ConditionoptionalEntity to match

origins:relative_health

Checks the entity's health as a percentage of max.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredPercentage value (0-1)
Example
"condition": {
"type": "origins:relative_health",
"comparison": "<=",
"compare_to": 0.5
}

This example will check if the player has half or less of their max health.

origins:resource

Checks the value of a resource.

FieldTypeDefaultDescription
resourceWildcard IdentifierrequiredResource power ID
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:resource",
"resource": "example:a_simple_resource",
"comparison": "==",
"compare_to": 1
}

This example will check if the player has a value of 1 in the example:a_simple_resource resource power. (data\example\powers\a_simple_resource.json)

origins:riding

Checks if the entity is riding another entity.

FieldTypeDefaultDescription
bientity_conditionBi-entity ConditionoptionalBi-entity condition between rider and vehicle
recursiveBooleanoptionalWhether to check recursively

origins:riding_recursive

Recursively checks ridden entities.

FieldTypeDefaultDescription
conditionEntity ConditionoptionalCondition at each level

origins:riding_root

Checks the root ridden entity.

FieldTypeDefaultDescription
bientity_conditionBi-entity ConditionoptionalCondition for the root vehicle

origins:saturation_level

Checks the player's saturation level.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:saturation_level",
"comparison": "==",
"compare_to": 0
}

This example will check if the player's saturation level reaches 0.

origins:scoreboard

Checks a scoreboard score.

FieldTypeDefaultDescription
nameStringoptionalScore holder name (defaults to entity name)
objectiveStringrequiredScoreboard objective name
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"condition": {
"type": "origins:scoreboard",
"objective": "obj",
"comparison": ">",
"compare_to": 3
}

This example will check if the score of the player in the obj scoreboard objective is greater than 3.

origins:set_size

Checks the entity's current set membership.

FieldTypeDefaultDescription
setWildcard IdentifierrequiredEntity set ID
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against

origins:sneaking

Checks if the entity is sneaking.

FieldTypeDefaultDescription
invertedBooleanfalseIf true, checks that the entity is NOT sneaking

origins:sprinting

Checks if the entity is sprinting.

origins:stat

Checks the value of a Minecraft statistic for the entity.

FieldTypeDefaultDescription
statStat ReferencerequiredThe stat to check.
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example 1
{
"type": "origins:stat",
"stat": "minecraft:deaths",
"comparison": ">=",
"compare_to": 10
}

This example will check if the player has died 10 or more times.

Example 2
{
"type": "origins:stat",
"stat": {
"stat_type": "minecraft:mined",
"id": "minecraft:diamond_ore"
},
"comparison": ">=",
"compare_to": 100
}

This example will check if the player has mined 100 or more diamond ores.

origins:submerged_in

Checks if the entity is submerged in a specific fluid.

FieldTypeDefaultDescription
fluidIdentifierrequiredFluid ID
Example
"condition": {
"type": "origins:submerged_in",
"fluid": "minecraft:water"
}

This example will check if the player is submerged in water.

origins:swimming

Checks if the entity is swimming.

origins:tamed

Checks if the entity is tamed.

origins:team

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether an entity belongs to any scoreboard team or a named team.

FieldTypeDefaultDescription
teamStringoptionalRequired scoreboard team name

origins:team

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether an entity belongs to any scoreboard team or, when team is present, a named team.

FieldTypeDefaultDescription
teamStringoptionalRequired scoreboard team name

origins:thundering

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether it is currently thundering in the entity's level.

FieldTypeDefaultDescription
None---

origins:time_of_day

Checks the time of day.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredTicks to compare against
Example
"condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins:time_of_day",
"comparison": ">=",
"compare_to": 12000
},
{
"type": "origins:time_of_day",
"comparison": "<=",
"compare_to": 13000
}
]
}

This example will check if it's the sun is currently setting.

origins:using_effective_tool

Checks if the entity is holding an effective tool for the block they're looking at.

origins:using_item

Checks if the entity is currently using an item.

FieldTypeDefaultDescription
item_conditionItem ConditionoptionalCondition for the item being used
Example
"condition": {
"type": "origins:using_item",
"item_condition": {
"type": "origins:food"
}
}

This example will check if the entity is currently eating a food item.

origins:xp_levels

Checks the player's XP levels.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:xp_levels",
"comparison": "<=",
"compare_to": 5
}

This example will check if the player has 5 levels or less.

origins:xp_points

Checks the player's XP points (progress toward next level).

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"condition": {
"type": "origins:xp_points",
"comparison": ">=",
"compare_to": 90
}

This example will check if the player has 90 or more experience points, which is only achieveable if the player have at least 7 levels.