How to use
- Choose the Java version and select one entity or enter a player name.
- Choose an attribute and action, then enter the value or modifier details.
- Copy the command into chat, or choose command block output. Download a .mcfunction to save it.
Start with Java 26.3, target @p, Max Health, and base set with value 40. The exact output is /attribute @p max_health base set 40. To inspect the stored base instead, choose base get. Get and base get can include an optional numeric scale; base set expects the value to store. Keep a record of the original base before replacing it if you plan to undo the change on a version without base reset.
The preview compares your input with the registry default and range. It does not read the selected entity from your world, its equipment, or its existing modifiers. A range warning can leave the command available, while the preview clamps the value to the reported range. Treat that number as a reference when planning a change, rather than a measurement of the entity you will target.
If no command appears, check that the selector identifies one entity. An unrestricted @e is rejected; use a player name or a selector with limit=1. Modifier actions also check the identifier format required by the selected version. Older formats require a UUID and a name when adding a modifier; newer formats use a namespaced ID. Keep the same identifier when removing that modifier.
Attribute command FAQ
Why does generic.max_health fail in new versions?
Java 1.21.2 removed the generic., player. and zombie. prefixes. Use max_health in newer versions; keep generic.max_health in 1.21.1.
What is the difference between a base value and a modifier?
The base value is the starting value. Modifiers add to it or multiply it. Get reads the effective value, while base get reads only the base.
How do I undo a change?
Remove a modifier using the same ID or UUID. Use base reset where available to restore the entity default; on older versions, use base set with the original value.



