X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=mods%2Fmob%2Fapi%2Fapi_hook.lua;h=6d1c2870f99666d45d7c29735df29bf6535a1f9b;hb=242a3d1665399c43fc68e3ae36cb5bf01334d98a;hp=4607bf2049fc397e742c94ad032e571443a8ed17;hpb=f39b7a6138697251614a5472b7d68a3ed1defd30;p=Crafter.git diff --git a/mods/mob/api/api_hook.lua b/mods/mob/api/api_hook.lua index 4607bf2..6d1c287 100644 --- a/mods/mob/api/api_hook.lua +++ b/mods/mob/api/api_hook.lua @@ -16,6 +16,8 @@ mobs.register_mob = function(def) local mob_register = {} +register_mob_spawner(def.mobname,def.textures,def.mesh) + ------------------------------------------------ mob_register.initial_properties = { physical = def.physical, @@ -30,6 +32,7 @@ mob_register.initial_properties = { automatic_face_movement_dir = def.automatic_face_movement_dir, automatic_face_movement_max_rotation_per_sec = def.automatic_face_movement_max_rotation_per_sec, makes_footstep_sound = def.makes_footstep_sound, + static_save = false, } @@ -144,6 +147,13 @@ mob_register.on_fire = false mob_register.fire_table = def.fire_table +mob_register.sound_pitch_mod_min = def.sound_pitch_mod_min +mob_register.sound_pitch_mod_max = def.sound_pitch_mod_max + +mob_register.sound_pitch_mod_min_die = def.sound_pitch_mod_min_die +mob_register.sound_pitch_mod_max_die = def.sound_pitch_mod_max_die + + if def.pathfinds then --mob_register.path = {} mob_register.pathfinding_timer = 0