Started by
Noxvern
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, there any way to stop player movement control?
I want to make a projectile that paralize you or if is not possible, spawn blocks arround him (like in all directions and 2 blocks of height to get stuck)
Appreciate the help!
Edited by Noxvern on Sun, 09/05/2021 - 22:14
There is no direct procedure block to do it but you can get the same result by adding a 255 level slowness potion effect to the player. You can also choose not to show the particles so it does not look like it has a potion effect, like in the example here: https://imgur.com/uJCe69n
Hope it helps!
I'm sorry, I forgot you can still jump being slowed, but if you duplicate the procedure adding 128 level Jump-Boost effect, the player won't move by any chance.
Thnx! I tried and it works perfectly
This is a great solution! Thanks!
what if a player has creative flight due to another mod? is there any way to teleport them to a certain entity?
A different way of achieving this is with the procedure block 'Attempt to override motion vector of {event target entity} to vx {0} vy {0} vz {0}', which I added with the 'on effect active tick' to a player of a custom potion effect.
This way, there is actually still a little bit of movement, but significantly less even when flying like with creative. It also makes you not fall(which can be added with a negative vy value).
To teleport self to the nearest entity while not changing the rotation of self:
/execute at @e[type=endermite,sort=nearest,limit=1] run tp @s ~ ~ ~
If you want to use the rotation of the entity you teleport to, simply use:
/tp @s @e[type=endermite,sort=nearest,limit=1]
To tp to a specific entity, use the target selector of the command. I used the closest endermite as an example.
https://minecraft.wiki/w/Target_selectors