From what I can see online, this is a common annoyance to code across all versions. How do I lock player movement but not mouse movement. I tried Cloud Wolf's datapack with not much success. I want to lock the player down without jitters.
I have tried:
- Summoning marker or armor stand at players feet and tp'ing player to that (thought that would be the way, but screw mojang I guess, that doesn't work. Only tp's you once WITH A REPEATING CMD BLOCK... HOW?!)
- Attribute modification/effect give slowness and jump boost 255 --- both of these kinda worked, but your FOV gets ZOOMED in and I'd hate to ask the players who play my map, have to check/find that setting
- Barrier blocks, but player suffocates inside. Am I forgetting a gamerule or way to stop them from suffocating?
In short, I want to lock player WASD movement and not mouse movement, and it has to be run at whatever position they were last at before the command to freeze them is ran.
I guess part of this post is, me asking if there is a better way I have somehow not found. This seems so insanely simple, but somehow impossible to do with common commands.