forked from mtcontrib/mobs_redo
updated api.txt
This commit is contained in:
parent
f917bf8bbe
commit
c7ad42b8e5
9
api.txt
9
api.txt
|
@ -1,5 +1,5 @@
|
|||
|
||||
MOB API (29th December 2016)
|
||||
MOB API (31st January 2017)
|
||||
|
||||
The mob api is a function that can be called on by other mods to add new animals or monsters into minetest.
|
||||
|
||||
|
@ -82,8 +82,8 @@ This functions registers a new mob as a Minetest entity.
|
|||
'shoot' shoots defined arrows when player is within range
|
||||
'explode' follows player in range and will flash and explode when in reach
|
||||
'dogshoot' shoots arrows when in range and one on one attack when in reach
|
||||
'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
||||
'dogshoot_count_max' number of seconds before switching above modes.
|
||||
'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
||||
'dogshoot_count_max' number of seconds before switching above modes.
|
||||
'custom_attack' is a function that is called when mob is in range to attack player, parameters are (self, to_attack)
|
||||
'double_melee_attack' if false then api will choose randomly between 'punch' and 'punch2' attack animations
|
||||
'on_blast' is called when TNT explodes near mob, function uses (object, damage) and returns (do_damage, do_knockback, drops)
|
||||
|
@ -118,11 +118,14 @@ This functions registers a new mob as a Minetest entity.
|
|||
'die_start' start frame of die animation
|
||||
'die_end' end frame of die animation
|
||||
'speed_normal' normal animation speed
|
||||
'fly_start' start frame of fly animation
|
||||
'fly_end' end frame of fly animation
|
||||
'speed_run' running animation speed
|
||||
'speed_punch' punching animation speed
|
||||
'speed_punch2' alternative punching animation speed
|
||||
'speed_shoot' shooting animation speed
|
||||
'speed_die' die animation speed
|
||||
'speed_fly' fly animation speed
|
||||
'replace_what' group if items to replace e.g. {"farming:wheat_8", "farming:carrot_8"}
|
||||
'replace_with' replace with what e.g. "air" or in chickens case "mobs:egg"
|
||||
'replace_rate' how random should the replace rate be (typically 10)
|
||||
|
|
Loading…
Reference in New Issue
Block a user