mojira.dev
MC-203165

Respawning after death in the Nether and End doesn't trigger minecraft:changed_dimension

Improved description by @unknown
The Bug:
When you die in the Nether (or End), the minecraft:changed_dimension advancement trigger does not trigger.

Steps to Reproduce:

  1. Download the data pack from the attachments (the .zip file)

  2. Create a new world with cheats on and run `/execute in minecraft:the_nether run tp ~ ~ ~` Note: You may need to teleport around a bit depending on your spawn

  3. Run `/execute in minecraft:overworld run tp ~ ~ ~` and notice the advancement triggered. (You will see a message in chat saying `You've changed dimension to Overworld!`

  4. Run the command from step 2, but afterwards this time kill yourself in some way.

  5. Notice the advancement did not trigger this time.

Expected Behavior:
The advancement would trigger as you spawned back in the Overworld.

Actual Behavior:
The advancement does not trigger.


Original Description:

As in the title. I was trying diffrent things with advancement trigger minecraft:changed_dimension and noticed it doesnt trigger when player gets teleported to spawn-point after death.

I've created example datapack with simple advancement checking for dimension change from The Nether to Overwold. Which rewards function foo:bar which simply displays message in chat saying "You've changed dimension to Overworld!" and revokes said advancement.

First test was teleporting from The Nether to Overworld using:

// execute in minecraft:overworld run teleport @p ~ ~ ~
Which worked as expected and triggered the advancement.

Upon dying however, when player got teleported to his orginal spawn-point set in Overworld the trigger didn't fire.

In attachments I provide the dim_change.json advancement and reward function foo.mcfunction files.

Attachments

Comments 2

In the title, "Teleport after death" should be changed to "Respawning" because only changing dimensions via respawning is affected.

Also, when entering the end portal in the end, changed_dimension is triggered with the overworld as the destination, regardless of where the respawn position is, so that can just be removed when fixing this bug.

Can confirm in 1.21-pre4.

Also, to add to uyp's statement, I was able to replicate this issue of end portals specifying the wrong destination, but ONLY if the player hasn't already seen the credits. Jumping into the end portal and watching the credits will always set the trigger's destination to the overworld regardless of where your spawnpoint is, but if you HAVE seen the credits already (meaning you arrive at your destination immediately), the correct spawn dimension will be passed into the trigger.

Kriomentos

(Unassigned)

Confirmed

(Unassigned)

1.16.3, 1.19.2, 24w21b, 1.21 Pre-Release 4

Retrieved