mojira.dev
MC-183834

/attribute lets you set base to value greater than attribute max value

When you use /attribute @s minecraft:whatever base set, you can set it to values much greater than maximum possible value for that attribute.

How to reproduce

  1. Run /attribute @s minecraft:generic.max_health base set 1000000 (the limit for health attribute is 1024). The command will be succesfully executed

  2. Bring the player to full health

  3. Use /data get entity @s Health, the value will never exceed 1024 because of the build in health limit

Expected behavior

The game should tell you that the value is too large instead of letting you run the command.

Comments 1

Confirmed in 1.20.4 and 24w06a.

fcelon

(Unassigned)

Confirmed

(Unassigned)

20w20a, 1.16.4, 20w51a

Retrieved