Very Many Players (Fabric)

Very Many Players (Fabric)

271k Downloads

Force-added player with duplicate UUID

Libreh opened this issue ยท 8 comments

commented

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 will be in a weird state where it among other things is invulnerable to damage.
If this is not a bug then how do I make my own mod compatible with VMP?

To Reproduce
Steps to reproduce the behavior:

  1. Use a mod that runs ServerPlayerEntity as early as PlayerJoin or the tick after that.
  2. 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

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.
commented

Try disabling use_async_chunks_on_login and see if it still happens.

commented

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?

commented

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.

commented

Reopening as a tracking issue for the fix.

commented

Alright, thank you.
Have a great day and great job on C2ME, VMP, etc!

commented

Do I need to check notInAnyWorld with the new reimplemntation?

commented

Do I need to check notInAnyWorld with 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.