Make villager stand still if there is near player
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / polar_bear.lua
blob8028655a3ae56ed2c2aa4fae9f10ad5be06eec45
1 --License for code WTFPL and otherwise stated in readmes
3 -- intllib
4 local MP = minetest.get_modpath(minetest.get_current_modname())
5 local S, NS = dofile(MP.."/intllib.lua")
7 --dofile(minetest.get_modpath("mobs").."/api.lua")
9 --###################
10 --################### POLARBEAR
11 --###################
14 mobs:register_mob("mobs_mc:polar_bear", {
15 type = "animal",
16 runaway = false,
17 passive = false,
18 stepheight = 1.2,
19 hp_min = 30,
20 hp_max = 30,
21 collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7},
22 visual = "mesh",
23 mesh = "mobs_mc_polarbear.b3d",
24 textures = {
25 {"mobs_mc_polarbear.png"},
27 visual_size = {x=3.0, y=3.0},
28 makes_footstep_sound = true,
29 damage = 6,
30 reach = 2,
31 walk_velocity = 1.2,
32 run_velocity = 2.4,
33 group_attack = true,
34 attack_type = "dogfight",
35 drops = {
36 -- 3/4 chance to drop raw fish (poor approximation)
37 {name = mobs_mc.items.fish_raw,
38 chance = 2,
39 min = 0,
40 max = 2,},
41 -- 1/4 to drop raw salmon
42 {name = mobs_mc.items.salmon_raw,
43 chance = 4,
44 min = 0,
45 max = 2,},
48 water_damage = 0,
49 floats = 1,
50 lava_damage = 5,
51 light_damage = 0,
52 fear_height = 4,
53 sounds = {
54 random = "Cowhurt1", -- TODO: Replace
55 distance = 16,
57 animation = {
58 speed_normal = 25, speed_run = 50,
59 stand_start = 0, stand_end = 0,
60 walk_start = 0, walk_end = 40,
61 run_start = 0, run_end = 40,
64 view_range = 16,
68 -- compatibility
69 mobs:alias_mob("mobs_mc:polarbear", "mobs_mc:polar_bear")
72 mobs:spawn_specific("mobs_mc:polar_bear", mobs_mc.spawn.snow, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 7000, 3, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
74 -- spawn egg
75 mobs:register_egg("mobs_mc:polar_bear", S("Polar Bear"), "mobs_mc_spawn_icon_polarbear.png", 0)
78 if minetest.settings:get_bool("log_mods") then
79 minetest.log("action", "MC Polar Bear loaded")
80 end