2017-05-23 00:35:56 -04:00
|
|
|
--MCmobs v0.4
|
2016-05-19 19:24:06 -04:00
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
|
|
|
|
|
|
|
--dofile(minetest.get_modpath("mobs").."/api.lua")
|
|
|
|
|
2017-05-25 20:39:12 -04:00
|
|
|
|
2017-05-22 22:27:00 -04:00
|
|
|
--###################
|
|
|
|
--################### ENDERMAN
|
|
|
|
--###################
|
|
|
|
|
2016-05-19 19:24:06 -04:00
|
|
|
|
2017-06-13 19:05:07 -04:00
|
|
|
mobs:register_mob("mobs_mc:ender_man", {
|
2016-05-19 19:24:06 -04:00
|
|
|
type = "monster",
|
2017-06-21 13:53:02 +02:00
|
|
|
runaway = true,
|
|
|
|
pathfinding = 2,
|
|
|
|
stepheight = 1.2,
|
2017-06-14 19:47:33 -04:00
|
|
|
hp_min = 40,
|
2017-05-28 23:16:44 -04:00
|
|
|
hp_max = 40,
|
2017-06-21 13:53:02 +02:00
|
|
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3},
|
|
|
|
rotate = -180,
|
2016-05-19 19:24:06 -04:00
|
|
|
visual = "mesh",
|
2017-05-23 00:35:56 -04:00
|
|
|
mesh = "enderman.b3d",
|
2016-05-19 19:24:06 -04:00
|
|
|
textures = {
|
2017-06-21 13:50:07 +02:00
|
|
|
{"mobs_mc_enderman.png^mobs_mc_enderman_eyes.png"},
|
2016-05-19 19:24:06 -04:00
|
|
|
},
|
2017-05-23 00:35:56 -04:00
|
|
|
visual_size = {x=3, y=3},
|
2016-05-19 19:24:06 -04:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
sounds = {
|
|
|
|
random = "mobs_sandmonster",
|
|
|
|
death = "green_slime_death",
|
|
|
|
damage = "Creeperdeath",
|
|
|
|
},
|
2017-05-28 23:16:44 -04:00
|
|
|
walk_velocity = 0.2,
|
|
|
|
run_velocity = 3.4,
|
2017-06-14 19:47:33 -04:00
|
|
|
damage = 7,
|
2016-05-19 19:24:06 -04:00
|
|
|
drops = {
|
|
|
|
{name = "farorb:farorb",
|
|
|
|
chance = 3,
|
|
|
|
min = 0,
|
|
|
|
max = 1,},
|
2016-07-19 21:21:47 -04:00
|
|
|
{name = "mobs_mc:enderman_head",
|
2016-08-05 19:18:12 -04:00
|
|
|
chance = 50,
|
2016-07-19 21:21:47 -04:00
|
|
|
min = 0,
|
|
|
|
max = 1,},
|
2016-05-19 19:24:06 -04:00
|
|
|
},
|
|
|
|
animation = {
|
2017-05-23 00:35:56 -04:00
|
|
|
speed_normal = 25, speed_run = 50,
|
|
|
|
stand_start = 40, stand_end = 80,
|
|
|
|
walk_start = 0, walk_end = 40,
|
|
|
|
run_start = 0, run_end = 40,
|
2016-05-19 19:24:06 -04:00
|
|
|
},
|
|
|
|
drawtype = "front",
|
2017-06-08 01:29:18 -04:00
|
|
|
water_damage = 8,
|
2016-05-19 19:24:06 -04:00
|
|
|
lava_damage = 5,
|
|
|
|
light_damage = 0,
|
|
|
|
view_range = 16,
|
2017-06-14 19:47:33 -04:00
|
|
|
fear_height = 10,
|
2016-05-19 19:24:06 -04:00
|
|
|
attack_type = "dogfight",
|
2017-05-27 02:08:50 -04:00
|
|
|
replace_rate = 1,
|
2017-05-28 23:16:44 -04:00
|
|
|
replace_what = {"default:torch","default:torch_wall", "default:cobble","default:wood"},
|
2016-05-19 19:24:06 -04:00
|
|
|
replace_with = "air",
|
|
|
|
replace_offset = -1,
|
|
|
|
|
|
|
|
})
|
2017-05-22 22:27:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-13 19:05:07 -04:00
|
|
|
-- compatibility
|
|
|
|
mobs:alias_mob("mobs_mc:enderman", "mobs_mc:ender_man")
|
2017-05-22 22:27:00 -04:00
|
|
|
|
2017-06-21 13:58:23 +02:00
|
|
|
--spawn on solid blocks
|
|
|
|
mobs:register_spawn("mobs_mc:ender_man", { "group:crumbly", "group:cracky", "group:solid" }, 7, 0, 9000, 1, 31000)
|
2016-05-19 19:24:06 -04:00
|
|
|
|
|
|
|
-- spawn eggs
|
2017-06-21 13:58:23 +02:00
|
|
|
mobs:register_egg("mobs_mc:ender_man", "Enderman", "mobs_mc_spawn_icon_enderman.png", 0)
|
2016-05-19 19:24:06 -04:00
|
|
|
|
2017-06-21 00:20:06 -04:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2017-06-14 19:47:33 -04:00
|
|
|
|
|
|
|
minetest.log("action", "MC Enderman loaded")
|
|
|
|
end
|
|
|
|
|