Герхард PICCORO Lenz McKAY
73fef41a81
* reported at the fork https://notabug.org/TenPlus1/dmobs/issues/6 * fix the follows tameable for almost logical animals * fix the drops of animals that are meal when dies * by example also elephant drops grass ? seriously.. * do not force forcing farming mod due commit about drop items * do not force mobs_animals neither so detect the mod if any
68 lines
1.4 KiB
Lua
68 lines
1.4 KiB
Lua
local followf = {}
|
|
|
|
-- detect common minetest famous mobs
|
|
if minetest.get_modpath("farming") then
|
|
table.insert(followf, "farming:wheat")
|
|
table.insert(followf, "farming:seed_cotton")
|
|
end
|
|
|
|
mobs:register_mob("dmobs:elephant", {
|
|
type = "animal",
|
|
passive = false,
|
|
reach = 1,
|
|
damage = 2,
|
|
attack_type = "dogfight",
|
|
hp_min = 12,
|
|
hp_max = 22,
|
|
armor = 130,
|
|
collisionbox = {-0.9, -1.2, -0.9, 0.9, 0.9, 0.9},
|
|
visual = "mesh",
|
|
mesh = "elephant.b3d",
|
|
textures = {
|
|
{"dmobs_elephant.png"},
|
|
},
|
|
blood_texture = "mobs_blood.png",
|
|
visual_size = {x=2.5, y=2.5},
|
|
makes_footstep_sound = true,
|
|
walk_velocity = 0.5,
|
|
run_velocity = 1,
|
|
jump = false,
|
|
water_damage = 2,
|
|
lava_damage = 2,
|
|
fire_damage = 2,
|
|
light_damage = 0,
|
|
fall_damage = 1,
|
|
fall_speed = -20, -- extra heavy!
|
|
fear_height = 2,
|
|
replace_rate = 10,
|
|
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"},
|
|
replace_with = "air",
|
|
follow = followf,
|
|
view_range = 14,
|
|
drops = {
|
|
{name = "mobs:meat_raw", chance = 2, min = 1, max = 3},
|
|
},
|
|
animation = {
|
|
speed_normal = 5,
|
|
speed_run = 10,
|
|
walk_start = 3,
|
|
walk_end = 19,
|
|
stand_start = 20,
|
|
stand_end = 30,
|
|
run_start = 3,
|
|
run_end = 19,
|
|
|
|
},
|
|
on_rightclick = function(self, clicker)
|
|
|
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
|
return
|
|
end
|
|
|
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
|
end,
|
|
})
|
|
|
|
|
|
mobs:register_egg("dmobs:elephant", "Elephant", "default_dry_grass.png", 1)
|