mojira.dev
MC-189278

/spreadplayers teleports target player into wall/air under specific conditions

When the spreadplayers command is used in a function that is part of the load or tick tags and if the target player in in a dimension other than the overworld the player has a large chance that they will be teleported up in the air or into a block.
The glitch also occurs if the command is in a function called by a function in the tick or load tags but not when the function is called manually by a player.

Original description:

When ever I use spreadplayers in a function with the tick tag or a function called by the ticking function it can teleport me into a wall or in mid air. The same command will not do this when typed in chat.
I've attached the datapack where this is happening below for easier testing.
You can type this command to reset yourself and make it teleport you agian
/tag @s remove nthstInt
Edit: The bug also appears when the command is called from a function in the load tag and only occurs when the target player is in the nether or end dimensions.

Linked issues

Attachments

Comments 5

Is it a new world or is it one that you opened in a previous snapshot? If it's the latter, chances are that your world is corrupted.

All the worlds I have tested it in are new worlds created with the datapack enabled before generation in 1.16 pre 5. I have yet to test it in pre 6. The spreadplayers command works properly when running the function manually through chat but not when run automatically through the tick function.

Edit: Just tested it in pre 6 and the issue is still there, new worlds, issue exists regardless if the datapack was added before or after world generation.

Edit 2: Here is the specific command if that helps
execute as @a[scores={nthst=10}] run spreadplayers 0 0 0 256 under 100 true @s

in the dimension the command is executed in, it searches for a spot to teleport the player to, and changes the coordinates accordingly

but it doesn't change the dimension of the player

that's all there is to it

Thanks for the clarification. I assumed that using the execute command as a player through a function would run the command in the dimension that player was in. Instead it always runs in the overworld regardless of where that player is (unless I use at @s)

Daniel S McLaughlin

(Unassigned)

Unconfirmed

Data Packs

1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1

Retrieved