mojira.dev
MC-132039

Players briefly spawn in wrong coordinates for one frame, holding item from a previous save game before being teleported without item

The bug

When working with multiple singleplayer worlds (not tested on multiplayer), the player will spawn in at the wrong location, holding the item they had in their hand from the previous world, before being teleported to their correct spawn location and that item then disappears from their hand.

This issue has the occasional effect of playing the water enter/leaving sounds depending on the seed you're using and the environment. You can replicate the player position and item holding issue flawlessly, but the water sound effect one is a bit harder to repeat consistently.

How to reproduce

  1. Make sure Minecraft is windowed (this will be easier to replicate.)

  2. Create a new single-player creative world

  3. Launch the world

  4. Place any item from the creative menu in your hand

  5. 'Save and Quit to Title'

  6. Create another new creative world

  7. While it's generating, tab out to another window, or click on the desktop – anything to remove the window focus from Minecraft

  8. After the world has generated, the "Game Menu" will appear. Notice you're holding the item from the previous world you were playing. Notice also your surroundings may be different from those you spawn into.

  9. Click 'Back to Game'

  10. Observe that the item you appear to have have teleported to your correct spawning location (if surroundings were different) and the item you were holding is now gone

Now we will repeat this on the other world, demonstrating the issue is consistent

  1. Place a different item in your player's hand

  2. 'Save and Quit to Title'

  3. Launch the first world you created

  4. Tab out, or click the desktop, to remove the window focus from Minecraft

  5. After the world has generated and the "Game Menu" appears, notice you're holding the item from the previous game and that your location surroundings will be different to the ones you're about to spawn back into

Notes

As I have explored this bug more and more, I've managed to replicate it consistently with the above steps. I have uploaded one final video demonstrating the entire bug, including items in hand. Please click the YouTube link for the best representation of this bug: https://www.youtube.com/watch?v=mRfegVLshnk

Linked issues

Attachments

Comments 12

Someone suggested it may be to do with whether the coordinates 0,0 are water or not. I have done some testing and found some another seed that seem to do this repeatedly, and they have a water block at 0,0. I'm not sure this is the cause yet, as there isn't a big enough sample size, and some worlds with water at 0,0 are not doing it in my tests.

 

668252533235536017
-3709921680383185983 (This is the seed from world zip linked in the original comments)

In my attempts to re-test this for 1.13-pre5, I managed to get it to do it repeatedly now with a "minecart rolls" sound (which was played back as audio and played back right at the end of the dirt loading screen, before the world appeared) on the same seed as above (-370992....)

Just for some better clarity around the splashing sound. I just tried one attempt and got two sounds played back. Exactly like this:

 

  1. On the "Loading terrain" screen I got a "player submerged in water" sound effect

  2. Once the game loaded and I was standing on grass I got a "player surfaces" type sound effect (Splashing.)

It was almost as if I became submerged momentarily before my player was positioned during the world load.

I've played with this some more and understand what is now happening with this bug. I have updated the description to more accurately reflect the issue and rewritten the steps. I have uploaded a new video showcasing the issue. Note during the world pre-load, I have tabbed out but due to the way I did the recording, that is not obvious. But the steps followed in the video are the same as those above, from step 4 onwards.

Updated accuracy of STR including some additional findings, and linked to a better representation of this bug via YouTube.

2 more comments

Can confirm in 20w48a.

Can confirm in 1.17.1.

@bugmancx, can you check if this has been fixed since 1.18.2 snapshot 22w03a?  A few related bugs (MC-9232, MC-133703) were fixed then.  (The one directly prior to that is release 1.18.1.)

Can confirm no longer occuring. Tested in 1.20.1

bugmancx

(Unassigned)

Confirmed

(Unassigned)

Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, ..., Minecraft 19w12a, 1.16.3, 1.16.4, 20w48a, 1.17.1

Retrieved