Adding absorption and xp API, and weather control (#540)
* fixes #537 * fixes #547
This commit is contained in:
1 parent
8acb322747
commit
42e67f27b7
9 files changed
+184
-20
No files matched your search
@@ -396,6 +396,18 @@ Number indicating remaining entity health, or `null` if not applicable.
|
||||
|
||||
Retrieves player hunger related information. For non-players, returns `null`.
|
||||
|
||||
### `query(e, 'absorption')`
|
||||
|
||||
Gets the absorption of the player (yellow hearts, e.g when having a golden apple.)
|
||||
|
||||
### `query(e,'xp')`
|
||||
### `query(e,'xp_level')`
|
||||
### `query(e,'xp_progress')`
|
||||
### `query(e,'score')`
|
||||
|
||||
Numbers related to player's xp. `xp` is the overall xp in the bar, `xp_level` is the levels seen in the hotbar,
|
||||
`xp_points` is a float between 0 and 1 indicating the percentage of the xp bar filled, and `score` is the score displayed upon death
|
||||
|
||||
### `query(e, 'air')`
|
||||
|
||||
Number indicating remaining entity health, or `null` if not applicable.
|
||||
@@ -706,6 +718,17 @@ Will set entity on fire for `ticks` ticks. Set to 0 to extinguish.
|
||||
|
||||
Modifies directly player raw hunger components. Has no effect on non-players
|
||||
|
||||
### `modify(e, 'absorption', value)`
|
||||
|
||||
Sets the absorption value for the player. Each point is half a yellow heart.
|
||||
|
||||
### `modify(e, 'add_xp', value)`
|
||||
### `modify(e, 'xp_level', value)`
|
||||
### `modify(e, 'xp_score', value)`
|
||||
|
||||
Manipulates player xp values - that's the method you probably want to use
|
||||
to manipulate how much 'xp' an action should give.
|
||||
|
||||
### `modify(e, 'air', ticks)`
|
||||
|
||||
Modifies entity air
|
||||
|
||||
Reference in new issue
Block a user