mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-06-28 06:30:18 +02:00
tweak custom attack function
This commit is contained in:
3
api.txt
3
api.txt
@ -291,7 +291,8 @@ enhance mob functionality and have them do many interesting things:
|
||||
time_from_last_punch, tool_capabilities, direction), return
|
||||
false to stop punch damage and knockback from taking place.
|
||||
'custom_attack' when set this function is called instead of the normal mob
|
||||
melee attack, parameters are (self, to_attack).
|
||||
melee attack, parameters are (self, to_attack) and if true
|
||||
is returned normal attack function continued.
|
||||
'on_die' a function that is called when mob is killed (self, pos)
|
||||
'do_custom' a custom function that is called every tick while mob is
|
||||
active and which has access to all of the self.* variables
|
||||
|
Reference in New Issue
Block a user