Skip to main content

Kill Entity

The arc:on_kill_entity action type is triggered when a player kills an entity.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:entityRepresents an entity in the game, such as a player, mob, or item.
arc:block_positionSpecifies the coordinates (x, y, z) of a block in the world.
arc:worldRefers to the world/dimension where the action occurs.
arc:exp_dropDefines the amount of experience points dropped by an action or entity.

Example

The following example will drop 3 white wool at the sheep's location every time a player kills a sheep.

data/my_datapack/arc/wool_for_killing_sheep.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_kill_entity",
"conditions": [
{
"type": "arc:entity_type",
"entity_type": "minecraft:sheep"
}
],
"rewards": [
{
"type": "arc:drop_item",
"item": {
"id": "minecraft:white_wool",
"count": 3
}
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: