Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NamePush
Syntaxpush [<entity>|...] (origin:<entity>/<location>) (destination:<location>) (speed:<#.#>) (duration:<duration>) (script:<name>) (def:<element>|...) (force_along) (precision:<#>) (no_rotate) (no_damage) (ignore_collision)
Short DescriptionPushes entities through the air in a straight line.
Full DescriptionPushes entities through the air in a straight line at a certain speed and for a certain duration,
triggering a script when they hit an obstacle or stop flying.

You must specify an entity to be pushed.

Usually, you should specify the origin and the destination. If unspecified, they will be assumed from contextual data.

You can specify the script to be run with the (script:<name>) argument,
and optionally specify definitions to be available in this script with the (def:<element>|...) argument.

Using the 'no_damage' argument causes the entity to receive no damage when they stop moving.

Optionally use the "ignore_collision" argument to ignore block collisions.

Optionally use "speed:#" to set how fast it should be pushed.

Optionally use "force_along" to cause the entity to teleport through any blockage.

Optionally use "no_rotate" to prevent entities being rotated at the start of the push.

Optionally use "duration:#" to set the max length of time to continue pushing.

The push command is ~waitable. Refer to Language:~waitable.
Related Tags<EntityTag.velocity> Returns the movement velocity of the entity. (...)
<entry[saveName].pushed_entities> returns the list of pushed entities.
Usage Example
# Use to launch an arrow straight towards a target.
- push arrow destination:<player.location>
Usage Example
# Use to launch an entity into the air.
- push cow
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/PushCommand.java#L40