added 'on_ground' and clarifications around motion.
This commit is contained in:
1 parent
3f593943c9
commit
2c0ed7bf69
3 files changed
+15
-2
No files matched your search
@@ -2567,12 +2567,18 @@ Returns a 3d vector where the entity is looking.
|
|||||||
|
|
||||||
### `query(e, 'motion')`
|
### `query(e, 'motion')`
|
||||||
|
|
||||||
Triple of entity's motion vector, `l(motion_x, motion_y, motion_z)`
|
Triple of entity's motion vector, `l(motion_x, motion_y, motion_z)`. Motion represents the velocity from all the forces
|
||||||
|
that exert on the given entity. Things that are not 'forces' like voluntary movement, or reaction from the ground are
|
||||||
|
not part of said forces.
|
||||||
|
|
||||||
### `query(e, 'motion_x'), query(e, 'motion_y'), query(e, 'motion_z')`
|
### `query(e, 'motion_x'), query(e, 'motion_y'), query(e, 'motion_z')`
|
||||||
|
|
||||||
Respective component of the entity's motion vector
|
Respective component of the entity's motion vector
|
||||||
|
|
||||||
|
### `query(e, 'on_ground')`
|
||||||
|
|
||||||
|
Returns `true` if en entity is standing on firm ground and falling down due to that.
|
||||||
|
|
||||||
### `query(e, 'name'), query(e, 'display_name'), query(e, 'custom_name'), query(e, 'type')`
|
### `query(e, 'name'), query(e, 'display_name'), query(e, 'custom_name'), query(e, 'type')`
|
||||||
|
|
||||||
String of entity name
|
String of entity name
|
||||||
|
|||||||
@@ -133,12 +133,18 @@ Returns a 3d vector where the entity is looking.
|
|||||||
|
|
||||||
### `query(e, 'motion')`
|
### `query(e, 'motion')`
|
||||||
|
|
||||||
Triple of entity's motion vector, `l(motion_x, motion_y, motion_z)`
|
Triple of entity's motion vector, `l(motion_x, motion_y, motion_z)`. Motion represents the velocity from all the forces
|
||||||
|
that exert on the given entity. Things that are not 'forces' like voluntary movement, or reaction from the ground are
|
||||||
|
not part of said forces.
|
||||||
|
|
||||||
### `query(e, 'motion_x'), query(e, 'motion_y'), query(e, 'motion_z')`
|
### `query(e, 'motion_x'), query(e, 'motion_y'), query(e, 'motion_z')`
|
||||||
|
|
||||||
Respective component of the entity's motion vector
|
Respective component of the entity's motion vector
|
||||||
|
|
||||||
|
### `query(e, 'on_ground')`
|
||||||
|
|
||||||
|
Returns `true` if en entity is standing on firm ground and falling down due to that.
|
||||||
|
|
||||||
### `query(e, 'name'), query(e, 'display_name'), query(e, 'custom_name'), query(e, 'type')`
|
### `query(e, 'name'), query(e, 'display_name'), query(e, 'custom_name'), query(e, 'type')`
|
||||||
|
|
||||||
String of entity name
|
String of entity name
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ public class EntityValue extends Value
|
|||||||
put("motion_x", (e, a) -> new NumericValue(e.getVelocity().x));
|
put("motion_x", (e, a) -> new NumericValue(e.getVelocity().x));
|
||||||
put("motion_y", (e, a) -> new NumericValue(e.getVelocity().y));
|
put("motion_y", (e, a) -> new NumericValue(e.getVelocity().y));
|
||||||
put("motion_z", (e, a) -> new NumericValue(e.getVelocity().z));
|
put("motion_z", (e, a) -> new NumericValue(e.getVelocity().z));
|
||||||
|
put("on_ground", (e, a) -> new NumericValue(e.onGround));
|
||||||
put("name", (e, a) -> new StringValue(e.getName().getString()));
|
put("name", (e, a) -> new StringValue(e.getName().getString()));
|
||||||
put("display_name", (e, a) -> new StringValue(e.getDisplayName().getString()));
|
put("display_name", (e, a) -> new StringValue(e.getDisplayName().getString()));
|
||||||
put("command_name", (e, a) -> new StringValue(e.getEntityName()));
|
put("command_name", (e, a) -> new StringValue(e.getEntityName()));
|
||||||
|
|||||||
Reference in new issue
Block a user