A simple command to add to an entity’s velocity.
Syntax:
/shove
Description:
adds the vector between the entity’s position and to the selected entity’s velocity. The vector’s length is capped to
Examples:
/shove @s ~ ~1 ~
Adds [0, 1, 0] to the player’s velocity
/shove @s 0 ~ 0 1
pushes the player toward the center of the world with a magnitude of 1.
/execute as @e[type=pig] run shove @s ~ ~ ~
Shoves every pig in the world toward the player. The farther away the pig, the faster it is shoved
/shove @e[type=arrow] ^ ^ ^10 100
Makes every arrow fly toward 10 blocks in front of where the player is looking
Why this should be added:
While it is possible to modify an entity’s Motion, it takes a lot of steps to do certain tasks. Most importantly, however, the player cannot have their motion data modified. The only really way to apply a force to the player is by using entity pushing which is not effective or efficient.
Adding the shove command would allow for things like boosting the player in a direction, making them jump, and enabling easy manipulation of entity motion, as shown in the examples.
Please sign in to leave a comment.
0 Comments