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 Type | Description |
|---|---|
arc:entity | Represents an entity in the game, such as a player, mob, or item. |
arc:block_position | Specifies the coordinates (x, y, z) of a block in the world. |
arc:world | Refers to the world/dimension where the action occurs. |
arc:exp_drop | Defines 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.
{
"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:
🌍 Dimension
The arc:dimension condition type checks if the player is in a specific dimension.
👤🧱 Entity In Block
The arc:entityinblock condition type checks if an entity is currently inside a specific block.
👤 Entity Type
The arc:entity_type condition type checks if an entity matches a specific type.
👥 Entity Types
The arc:entity_types condition type checks if an entity is one of several specified types.
💰 Experience Drop
The arc:exp_drop condition type checks if the amount of experience dropped is within a specified range.
🪙✅ Item Equipped
The arc:item_equipped condition type checks if the player has a specific item equipped in any armor slot.
🪙✋ Item In Hand
The arc:iteminhand condition type checks if the player is holding a specific item in their main hand, off-hand, or either hand.
🪙📦 Item In Inventory
The arc:itemininventory condition type checks if the player has a specific item anywhere in their main inventory.
🚫 Not
The arc:not condition type inverts the result of its nested conditions. It is met if none of the specified conditions are met.
❌🧱 Not In Block Pos Cache
The arc:notinblockposcache condition type checks if a block's position is not in the player's recent placement history. This is useful for preventing rewards from blocks that the player has placed themselves.
🔀 Or
The arc:or condition type is met if at least one of its nested conditions is met.
✂️🐑 Ready For Shearing
The arc:readyforshearing condition type checks if a shearable entity is ready to be sheared.
📋 Scoreboard
The arc:scoreboard condition type checks if a player's score in a specific objective is within a given range.
👥 Team
The arc:team condition type checks if a player is on a specific scoreboard team.
Compatible Reward Types
The following reward types can be used with this action type:
💻 Command
The arc:command reward type executes a server command.
🪙 Drop Item
The arc:drop_item reward type drops an item at a specified location.
🔥👤 Entity On Fire
The arc:entityonfire reward type sets the target entity on fire.
✨ Experience
The arc:exp reward type gives the player a specified range of experience points.
✨➕ Experience Multiplier
The arc:exp_multiplier reward type multiplies the amount of experience dropped from an action.
🪙 Item
The arc:item reward type gives an item directly to the player's inventory.
👤➡️ Move To Entity
The arc:movetoentity reward type pulls the player towards the target entity's location.
➡️➡️ Multiple Arrows
The arc:multiple_arrows reward type shoots additional arrows when a player shoots a bow.
💉 Potion Effect
The arc:effect reward type applies a potion effect to the player.