82 lines
1.7 KiB
Lua
82 lines
1.7 KiB
Lua
--MCmobs v0.4
|
|
--maikerumine
|
|
--made for MC like Survival game
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
|
--dofile(minetest.get_modpath("mobs").."/api.lua")
|
|
|
|
|
|
--###################
|
|
--################### ENDERMAN
|
|
--###################
|
|
|
|
|
|
mobs:register_mob("mobs_mc:enderman", {
|
|
type = "monster",
|
|
runaway = true,
|
|
pathfinding = 2,
|
|
stepheight = 1.2,
|
|
hp_min = 40,
|
|
hp_max = 40,
|
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3},
|
|
rotate = -180,
|
|
visual = "mesh",
|
|
mesh = "enderman.b3d",
|
|
textures = {
|
|
{"mobs_mc_enderman.png^(mobs_mc_enderman_eyes.png^[makealpha:0,0,0)"},
|
|
},
|
|
visual_size = {x=3, y=3},
|
|
makes_footstep_sound = true,
|
|
sounds = {
|
|
random = "mobs_sandmonster",
|
|
death = "green_slime_death",
|
|
damage = "Creeperdeath",
|
|
},
|
|
walk_velocity = 0.2,
|
|
run_velocity = 3.4,
|
|
damage = 7,
|
|
drops = {
|
|
{name = "farorb:farorb",
|
|
chance = 3,
|
|
min = 0,
|
|
max = 1,},
|
|
{name = "mobs_mc:enderman_head",
|
|
chance = 50,
|
|
min = 0,
|
|
max = 1,},
|
|
},
|
|
animation = {
|
|
speed_normal = 25, speed_run = 50,
|
|
stand_start = 40, stand_end = 80,
|
|
walk_start = 0, walk_end = 40,
|
|
run_start = 0, run_end = 40,
|
|
},
|
|
drawtype = "front",
|
|
water_damage = 8,
|
|
lava_damage = 5,
|
|
light_damage = 0,
|
|
view_range = 16,
|
|
fear_height = 10,
|
|
attack_type = "dogfight",
|
|
replace_rate = 1,
|
|
replace_what = {"default:torch","default:torch_wall", "default:cobble","default:wood"},
|
|
replace_with = "air",
|
|
replace_offset = -1,
|
|
|
|
})
|
|
|
|
|
|
|
|
--spawn on solid blocks
|
|
mobs:register_spawn("mobs_mc:enderman", { "group:crumbly", "group:cracky", "group:solid" }, 7, 0, 9000, 1, 31000)
|
|
|
|
-- spawn eggs
|
|
mobs:register_egg("mobs_mc:enderman", "Enderman", "mobs_mc_spawn_icon_enderman.png", 0)
|
|
|
|
if minetest.settings:get_bool("log_mods") then
|
|
|
|
minetest.log("action", "MC Enderman loaded")
|
|
end
|
|
|