Damage Command Generator

Deal a chosen amount and type of damage, optionally attributing it to a position or entity when the edition supports it

Java requires one entity at a time, such as @s or @e[type=zombie,limit=1]

Java accepts decimals; Bedrock requires a whole number.

You can enter a resource location from a data pack, or leave this blank to use the game default.

How to use the Damage command generator

  1. Choose an edition, then enter the target and damage amount.
  2. Choose a damage type, since armor, immunity, and death messages may react differently.
  3. If the game should know who attacked, select a damager entity.
  4. Copy the command and run it in Minecraft.

Java uses resource-location damage types and supports at, by and from, while Bedrock uses a fixed cause enum and the form entity <damager>. This tool switches the syntax automatically.

Damage was added in Java 1.19.4, so this tool is available only for the Java 1.20.5+ profiles and Bedrock Stable.

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Deal basic damage to yourself

The shortest form works on both Java and Bedrock, making it useful for testing damage-detection logic in command blocks

/damage @s 4

What it does Will deal 4 damage to themselves (whoever runs the command) using the game's default damage type.

2. Java arrow damage with its shooter attributed

Names both the arrow that hit and the Skeleton that fired it, preserving the direct and indirect sources

/damage @p 6.5 minecraft:arrow by @e[type=arrow,limit=1] from @e[type=skeleton,limit=1]

What it does Will deal 6.5 damage of type minecraft:arrow to the nearest player, attributing it to @e[type=arrow,limit=1] with @e[type=skeleton,limit=1] as the indirect cause.

3. Bedrock fire damage attributed to an attacker

Uses a Bedrock cause and one damager so the game knows which entity was responsible

/damage @a 6 fire entity @s

What it does Will deal 6 damage of type fire to all players, attributing it to @s.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Every version this tool supports produces the same result, so a command you copy works without version-specific edits

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Bedrock Edition (stable)
/damage @s 4

Before you use these