Force-added player with duplicate UUID
Describe the bug
I'm not sure if this is a bug in itself or a compatibility issue.
If VMP is installed on servers with mods that do ServerPlayerEntity#teleport very early after the player has joined the console will say Force-added player with duplicate UUID <player uuid> (https://modrinth.com/mod/yet-another-minecraft-bingo does this for example).
The player associated with
To Reproduce Steps to reproduce the behavior:
- Use a mod that runs ServerPlayerEntity as early as PlayerJoin or the tick after that.
- See message in console and player will be in a weird bugged state.
Expected behavior Without VMP the player joins without the message and isn't invulnerable or anything weird.
Runtime info (please complete the following information):
- OS: Linux
- Minecraft version: 1.21
- Mod version: 0.2.0+beta.7.162 devbuild for 1.21
Checklist
- [x] I am using the official version of the mod.
- [x] I tried the latest development version but the issue persists.
- [x] I searched for similar open issues and could not find an existing bug report on this.
Try disabling use_async_chunks_on_login and see if it still happens.
That does fix it, but is there any way to avoid the issue with use_async_chunks_on_login set to true?
Is compatibility with it enabled possible?
A rewrite is currently planned to avoid such issues completely.
In the current implementation, players in async loading stage have notInAnyWorld set to true. You can avoid teleporting such player by checking that field in the meantime. Or disable the option as a workaround for end users for now.
Alright, thank you. Have a great day and great job on C2ME, VMP, etc!
Reopening as a tracking issue for the fix.
Do I need to check notInAnyWorld with the new reimplemntation?
Do I need to check
notInAnyWorldwith the new reimplemntation?
You don't have to now, since the player shouldn't be visible by anything else when the chunk is loading in.
Just wondering, is there any use to keeping this up now? Considering that the new reimplementation fixes my issue?