Skip to main content

Meta Condition Types

Meta condition types are conditions that execute other conditions. They can be used to create complex conditions by combining multiple conditions together.

Universal Types​

info

These meta condition types can be used in all types of conditions.

origins:and​

All conditions must be true.

FieldTypeDefaultDescription
conditionsList of Bi-entity ConditionrequiredConditions

origins:chance​

Random chance.

FieldTypeDefaultDescription
chanceFloatrequiredProbability (0-1)

origins:constant​

Always true or false.

FieldTypeDefaultDescription
valueBooleantrueConstant value
Example
"condition": {
"type": "origins:constant",
"value": true
}

This example is always true.

origins:not​

Inverts a condition.

FieldTypeDefaultDescription
conditionBi-entity ConditionrequiredCondition to invert
Example1
"condition": {
"type": "origins:sprinting",
"inverted": true
}

This example will check if the player is not sprinting.

Example2
"condition": {
"type": "origins:not",
"condition": {
"type": "origins:exposed_to_sun"
}
}

This example will check if the entity is not exposed to the sun.

origins:or​

At least one condition must be true.

FieldTypeDefaultDescription
conditionsList of Bi-entity ConditionrequiredConditions
Example
"condition": {
"type": "origins:or",
"conditions": [
{
"type": "origins:status_effect",
"effect": "minecraft:poison"
},
{
"type": "origins:status_effect",
"effect": "minecraft:wither"
}
]
}

This example will check if the entity has either the Poison or Wither status effects.

Bi-entity Specific​

origins:actor_condition​

Evaluates an entity condition on the actor.

FieldTypeDefaultDescription
conditionEntity ConditionrequiredCondition on the actor
Example
"bientity_condition": {
"type": "origins:actor_condition",
"condition": {
"type": "origins:tamed"
}
}

This example will check if the actor entity is a tamable and tamed mob.

origins:both​

Evaluates an entity condition on both actor and target.

FieldTypeDefaultDescription
conditionEntity ConditionrequiredCondition for both entities
Example
"bientity_condition": {
"type": "origins:both",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:player"
}
}

This example will check if both the actor entity and the target entity is a player.

origins:either​

Evaluates an entity condition on either entity.

FieldTypeDefaultDescription
conditionEntity ConditionrequiredCondition for either
Example
"bientity_condition": {
"type": "origins:either",
"condition": {
"type": "origins:in_rain"
}
}

This example will check if either the actor or target entities are in rain.

origins:invert​

Swaps actor and target.

FieldTypeDefaultDescription
conditionBi-entity ConditionrequiredCondition with swapped entities

origins:target_condition​

Evaluates an entity condition on the target.

FieldTypeDefaultDescription
conditionEntity ConditionrequiredCondition on the target
Example
"bientity_condition": {
"type": "origins:target_condition",
"condition": {
"type": "origins:tamed"
}
}

This example will check if the target entity is a tamable and a tamed mob.

Block Specific​

origins:offset​

Evaluates a condition at an offset position.

FieldTypeDefaultDescription
conditionBlock ConditionrequiredCondition to evaluate
xInteger0X offset
yInteger0Y offset
zInteger0Z offset