mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-06-28 06:30:18 +02:00
on_flop and air_damage added
This commit is contained in:
4
api.txt
4
api.txt
@ -64,6 +64,7 @@ functions needed for the mob to work properly which contains the following:
|
||||
'fall_damage' when true causes falling to inflict damage.
|
||||
'water_damage' holds the damage per second infliced to mobs when standing in
|
||||
water.
|
||||
'air_damage' holds damage per second inflicted to mob when standing in air.
|
||||
'lava_damage' holds the damage per second inflicted to mobs when standing
|
||||
in lava or fire or an ignition source.
|
||||
'light_damage' holds the damage per second inflicted to mobs when light
|
||||
@ -299,6 +300,9 @@ enhance mob functionality and have them do many interesting things:
|
||||
is returned normal attack function continued.
|
||||
'on_die' a function that is called when mob is killed (self, pos), also
|
||||
has access to self.cause_of_death table.
|
||||
'on_flop' function called when flying or swimmimng mob is no longer in
|
||||
air/water, (self) paramater and return true to skip the built
|
||||
in api flop feature.
|
||||
'do_custom' a custom function that is called every tick while mob is
|
||||
active and which has access to all of the self.* variables
|
||||
e.g. (self.health for health or self.standing_in for node
|
||||
|
Reference in New Issue
Block a user