Skip to main content

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

Block With Shield

The arc:on_block_with_shield action type is triggered when a player successfully blocks damage using a shield.

Action Data

When this action is triggered, the following action data is made available:

Action Data TypeDescription
arc:damage_sourceIdentifies the source of damage, such as an entity, environment, or effect.
arc:damage_amountQuantifies the amount of damage dealt or received in an action.
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.

Example

The following example pushes the attacker away when blocking a zombie.

data/my_datapack/arc/shield_knockback.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_block_with_shield",
"conditions": [
{
"type": "arc:entity_type",
"entity_type": "minecraft:zombie"
}
],
"rewards": [
{
"type": "arc:push_entity",
"force": 2.0
}
]
}

Compatible Condition Types

Compatible Reward Types