The Bug:
The "minecraft:movement_speed" attribute resets upon reloading the world.
All attributes should be saved upon the world being reloaded. A workaround for this bug would be to use attribute modifiers instead of altering the base attribute.
Steps to Reproduce:
Alter your "minecraft:movement_speed" attribute by using the command provided below.
/attribute @s minecraft:movement_speed base set 0.3
Run around and observe your movement speed.
Exit the world, reload into it, run around, and observe your movement speed.
Observed Behavior:
The "minecraft:movement_speed" attribute is reset.
Expected Behavior:
The "minecraft:movement_speed" attribute would not be reset.
Linked issues
is duplicated by
relates to
Attachments
Comments


This also happens when you die.

Can confirm in 1.16.1
Reports can only be confirmed for the latest version (1.16.5) and snapshot
Video attached.

The game does not save this attribute due to an error.
Can confirm in 1.18.1 and 22w05a.
Can confirm in 1.18.2 and 1.19 Pre-release 1.
Can confirm in 1.19.
[media][media]Can confirm in 1.19.2.

Can confirm in 1.20.1

Requesting ownership if possible.

Still here in 1.21's full release.

still here

Still an issue in 1.21.5 — this is incredibly annoying when trying to give players permanent stat boosts via datapack.
The bug should be assigned to the Commands category.