mojira.dev
MC-273291

/spawnpoint command does not work when executed from an enchantment effect.

Attempting to have a player run a function containing the /spawnpoint command from a custom enchantment does not set a new spawnpoint.

Steps to Reproduce:

  • Create a custom enchantment inside of a datapack.

  • Make the enchantment run a function containing the /spawnpoint command as an effect by the "hit_block" effect.

  • activate the enchantment on a tool.

  • run /kill command

Observed results: Player respawns at world spawn

Expected Results: Player should spawn at location that the /spawnpoint command was ran from.

 

Notes: Attached are the custom enchantment and function included. The other two commands work as intended. Running the function in game manually will set the player's spawn properly.

Attachments

Comments 1

Please attach a datapack as a .zip file so we can easily reproduce the issue

Ambideer Hendrix

(Unassigned)

Unconfirmed

(Unassigned)

1.21 Release Candidate 1

Retrieved