Make villager stand still if there is near player
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / villager_vindicator.lua
blobaafd083beafdace14d57e0c254de09473e6e0591
1 --MCmobs v0.4
2 --maikerumine
3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
6 -- intllib
7 local MP = minetest.get_modpath(minetest.get_current_modname())
8 local S, NS = dofile(MP.."/intllib.lua")
10 --dofile(minetest.get_modpath("mobs").."/api.lua")
11 --###################
12 --################### VINDICATOR
13 --###################
16 mobs:register_mob("mobs_mc:vindicator", {
17 type = "monster",
18 physical = false,
19 pathfinding = 1,
20 hp_min = 24,
21 hp_max = 24,
22 collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
23 visual = "mesh",
24 mesh = "mobs_mc_vindicator.b3d",
25 textures = {
27 "mobs_mc_vindicator.png",
28 "blank.png", --no hat
29 "default_tool_steelaxe.png",
30 -- TODO: Glow when attacking (mobs_mc_vindicator.png)
33 visual_size = {x=3, y=3},
34 makes_footstep_sound = true,
35 damage = 13,
36 reach = 2,
37 walk_velocity = 1.2,
38 run_velocity = 2.4,
39 attack_type = "dogfight",
40 drops = {
41 {name = mobs_mc.items.emerald,
42 chance = 1,
43 min = 0,
44 max = 1,},
45 {name = mobs_mc.items.iron_axe,
46 chance = 11,
47 min = 1,
48 max = 1,},
50 sounds = {
51 random = "Villager1",
52 death = "Villagerdead",
53 damage = "Villagerhurt1",
55 animation = {
56 stand_speed = 25,
57 stand_start = 40,
58 stand_end = 59,
59 walk_speed = 25,
60 walk_start = 0,
61 walk_end = 40,
62 run_speed = 25,
63 punch_speed = 25,
64 punch_start = 90,
65 punch_end = 110,
66 die_speed = 25,
67 die_start = 170,
68 die_end = 180,
69 die_loop = false,
71 water_damage = 1,
72 lava_damage = 4,
73 light_damage = 0,
74 view_range = 16,
75 fear_height = 4,
79 -- spawn eggs
80 mobs:register_egg("mobs_mc:vindicator", S("Vindicator"), "mobs_mc_spawn_icon_vindicator.png", 0)
82 if minetest.settings:get_bool("log_mods") then
83 minetest.log("action", "MC vindicator loaded")
84 end