tweaks to entity API code

This commit is contained in:
gnembon committed 2020-04-29 11:32:42 -03:00
1 parent 1aa237379e
commit 1e9a8726be
6 files changed
+72 -44

No files matched your search

+6 -4
View File
@@ -400,7 +400,7 @@ Adds a vector to the motion vector. Most realistic way to apply a force to an en
### `modify(e, 'age', number)`
Modifies entity's internal age counter. Fiddling with this will affect directly behaviours of complex
Modifies entity's internal age counter. Fiddling with this will affect directly AI behaviours of complex
entities, so use it with caution.
### `modify(e, 'pickup_delay', number)`
@@ -470,10 +470,14 @@ Modifies gamemode of player to whatever string (case-insensitive) or number you
### `modify(e, 'jumping', true/false)`
Will make the entity constantly jump if set to true, and will stop the entity from jumping if set to false.
Note that jumping parameter can be fully controlled by the entity AI, so don't expect that this will have
a permanent effect. Use `'jump'` to make an entity jump once for sure.
Requires a living entity as an argument.
### `modify(e, 'jump'))`
Will make the entity jump once only
Will make the entity jump once.
### `modify(e, 'silent', true/false)`
@@ -483,8 +487,6 @@ Will make the entity jump once only
Will set mob on fire for `ticks` ticks. Set to 0 to extinguish.
### `modify(e, 'age', age)`
## Entity Events
There is a number of events that happen to entities that you can attach your own code to in the form of event handlers.