mojira.dev
MC-124865

"teleport @s ~ ~ ~" by tick causes huge lag in game

Sometimes we need to change players' rotation without changing their positions. For example when we try to simulate "gun fire" in game. Players who fires constantly receives huge recoil. To make this we offen use "tp ~ ~ ~ ~ ~-x", in which x is the angle.
After we set this command and added to "minecraft:tick", we found that it would cause huge lag in game. You will even see that you walk away from where you shoot, still be dragged back after a few seconds. Disabling "tp" command can avoid this, but we could no more make "recoil" functions.
Hope you can fix it or just tell me why it performs like this.

Steps to reproduce:
1. Set a repeating command block, in which the command is{execute as @a at @s run tp @s ~ ~ ~ ~ ~}
2. Activate it, get some snowballs, run and shoot.
3. Deactivate it, and try shooting again.
4. Then you know what I mean.

Comments 1

Cannot reproduce in 18w21b.
If it's still an issue, please force a crash by pressing F3 + C for 10 seconds while in-game and attach the crash report (minecraft/crash-reports/crash-<DATE>-client.txt) here.

Civi

(Unassigned)

Unconfirmed

Minecraft 18w05a

Retrieved