Skip to main content

Get 25% OFF on your first order with BisectHosting using code "DAQEM"!

Entity Data

The arc:entity_data condition type checks specific properties of an entity using registered data resolvers.

Parameters

ParameterTypeRequiredDefaultDescription
propertiesEntityDataProperty[]Required-List of properties to check.
targetstringOptionalplayer'player' or 'entity'.

Example

The following example checks if the target entity is a baby.

data/my_datapack/arc/no_harm_babies.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_hurt_entity",
"conditions": [
{
"type": "arc:entity_data",
"target": "entity",
"properties": [
{
"id": "arc:is_baby",
"value": "true"
}
]
}
],
"rewards": [
{
"type": "arc:cancel_action"
}
]
}

Compatible Action Types