Merge pull request #241 from Ghoulboy78/modfy

added gamemode and jumping modifications
This commit is contained in:
gnembon authored and GitHub committed 2020-04-29 10:36:48 -03:00
commit 1aa237379e
4 files changed
+140 -16

No files matched your search

+28
View File
@@ -2719,6 +2719,34 @@ and `true`. If no duration is specified, or it is null or 0, the effect is remov
Sets AI to stay around the home position, within `distance` blocks from it. `distance` defaults to 16 blocks.
`null` removes it. _May_ not work fully with mobs that have this AI built in, like Villagers.
### `modify(e, 'gamemode', gamemode?), modify(e, 'gamemode',gamemode_id?)`
Modifies gamemode of player to whatever string (case-insensitive) or number you put in.
* 0: survival
* 1: creative
* 2: adventure
* 3: spectator
### `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.
### `modify(e, 'jump'))`
Will make the entity jump once only
### `modify(e, 'silent', true/false)`
### `modify(e, 'gravity', true/false)`
### `modify(e, 'fire', ticks)`
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.
+27
View File
@@ -458,6 +458,33 @@ and `true`. If no duration is specified, or it is null or 0, the effect is remov
Sets AI to stay around the home position, within `distance` blocks from it. `distance` defaults to 16 blocks.
`null` removes it. _May_ not work fully with mobs that have this AI built in, like Villagers.
### `modify(e, 'gamemode', gamemode?), modify(e, 'gamemode',gamemode_id?)`
Modifies gamemode of player to whatever string (case-insensitive) or number you put in.
* 0: survival
* 1: creative
* 2: adventure
* 3: spectator
### `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.
### `modify(e, 'jump'))`
Will make the entity jump once only
### `modify(e, 'silent', true/false)`
### `modify(e, 'gravity', true/false)`
### `modify(e, 'fire', ticks)`
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.