COWMODSКаталог модов

Player Motion

Explosion-based library that uses subtick timing to ensure that only one player is pushed by the blast without any side effects.

Автор: MulverineX6,3 тыс.59обновлён 24 окт. 2026 г.
Механики игрыБиблиотеки

Описание

Player Motion

Player Motion is an explosion-based library that uses subtick timing to ensure that only one player is pushed by the blast without any side effects.

Credit to @BigPapi13 for making the original library this is inspired by. This project aims to succeed it.

Credit to nedraw from the minecraft commands discord for the ender crystal methodology & implementation this is now based on.

Credit to @SuperSwordTW for helping make significant math performance & stability improvements.

How to use

Launching a player where in a specific direction

scoreboard players set $strength player_motion.api.launch 10000
function player_motion:api/launch_looking
  • $strength represents motion in blocks/tick, scaled by 10000. A strength of 10000 will push the player at 1 block/tick
  • The facing direction in which the function is called is the direction the player will be launched
  • Only the player executing the command will receive a motion update

Launching a player with xyz vector

scoreboard players set $x player_motion.api.launch 500
scoreboard players set $y player_motion.api.launch 12000
scoreboard players set $z player_motion.api.launch -3125
function player_motion:api/launch_xyz
  • $x, $y, and $z are the strength in blocks/tick to launch the player in the x, y, and z directions
  • As before, only the player executing the command will be launched

*Note: These functions are additive and will apply motion in addition to existing motion rather than directly setting it to whatever input you send

Limitations + Known Issues

While this library is likely the closest we've gotten to perfect player motion manipulation, there are some limitations worth mentioning:

  • MSPT Inconsistency: Even though the motion applied is constant, the rate at which the server and client update may vary, and calling motion updates per tick may result in inconsistencies when these variations become too large. For consistent results, the library should only be used for instantaneous bursts of motion, and continuous forces should instead rely on riding-based methods or levitation, depending on the context.

If you know any possible solutions or would like to help fixing these problems, please let me know!

Последние версии

Все версии →
release

Remove preceeding tab characters from a few commands

1.4.5
24 окт. 2026 г.98Minecraft: 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3datapack
Скачать
Что нового
At some point mojang stopped allowing this, it was a linting error/typo anyway, this release is an emergency fix.
release

Removed unnecessary broken load

1.4.4
19 авг. 2025 г.2,2 тыс.Minecraft: 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8datapack
Скачать
release

Scope knockback resistance removal to explosions

1.4.3
8 июл. 2025 г.230Minecraft: 24w38a, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8datapack
Скачать
Что нового
Also updated pack format to 1.21.7
release

Fix negative y motion

1.4.2
5 окт. 2024 г.1 тыс.Minecraft: 24w38a, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7datapack
Скачать
Что нового
When using launch_xyz with a negative y score a much higher value was required to achieve results because of faulty math, this is now fixed. Credit to nedraw.
alpha

Support 1.21.2 snapshots

1.4.1
15 сент. 2024 г.88Minecraft: 24w37adatapack
Скачать
Что нового
## [DISCLAIMER, applying motion frequently/every tick causes the player to get stuck and sometimes hear explosion noises, due to desync issues and teleport command behavior. Please upvote [MC-276722](https://bugs.mojang.com/browse/MC-276722), [MC-276704](https://bugs.mojang.com/browse/MC-276704)]
release

Improve math performance & stability

1.3.1
25 июл. 2024 г.2,1 тыс.Minecraft: 1.21datapack
Скачать
Что нового
[https://github.com/MulverineX/player_motion/releases/tag/v1.3.1](https://github.com/MulverineX/player_motion/releases/tag/v1.3.1)
release

Use ender crystals to avoid subtick hacks

1.3.0
16 июл. 2024 г.108Minecraft: 1.21datapack
Скачать
Что нового
## Huge shoutout to `nedraw` from the minecraft commands discord for doing most of the heavy lifting for this release! - Completely resolves incompatibilities with (terrible) server modding platforms like Paper. - Much lower complexity; easier to maintain/update! - Much more efficient; easier on server TPS! - Works on peaceful mode! - Now cancels launch function if the player is on a mount. - Near-perfect launch power parity with the previous method.
release

Update to 1.21

1.2.0
16 июл. 2024 г.78Minecraft: 1.21datapack
Скачать
release

Fixed multiplayer support

1.1.0
22 апр. 2024 г.291Minecraft: 1.20.5, 1.20.6datapack
Скачать
Что нового
Credit to [Evtema3](https://github.com/Evtema3)