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-22 22:27:00 -04:00
|
|
|
--###################
|
|
|
|
--################### SPIDER
|
|
|
|
--###################
|
|
|
|
|
|
|
|
|
2016-05-19 19:24:06 -04:00
|
|
|
-- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
|
|
|
mobs:register_mob("mobs_mc:spider", {
|
|
|
|
type = "monster",
|
|
|
|
passive = false,
|
2017-05-24 22:02:00 -04:00
|
|
|
docile_by_day = true,
|
2016-05-19 19:24:06 -04:00
|
|
|
attack_type = "dogfight",
|
|
|
|
pathfinding = true,
|
|
|
|
damage = 2,
|
2017-06-14 19:47:33 -04:00
|
|
|
hp_min = 16,
|
|
|
|
hp_max = 16,
|
2017-05-24 22:04:24 -04:00
|
|
|
collisionbox = {-0.35, -0.01, -0.35, 0.35, 1, 0.35},
|
2017-05-23 00:35:56 -04:00
|
|
|
rotate = -180,
|
2016-05-19 19:24:06 -04:00
|
|
|
visual = "mesh",
|
2017-05-23 00:35:56 -04:00
|
|
|
mesh = "spider.b3d",
|
2016-05-19 19:24:06 -04:00
|
|
|
textures = {
|
2017-05-23 00:35:56 -04:00
|
|
|
{"spider.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 = false,
|
|
|
|
sounds = {
|
|
|
|
random = "mobs_spider",
|
|
|
|
attack = "mobs_spider",
|
|
|
|
},
|
|
|
|
walk_velocity = 1.7,
|
|
|
|
run_velocity = 3.3,
|
|
|
|
jump = true,
|
2017-06-14 19:47:33 -04:00
|
|
|
view_range = 16,
|
2016-05-19 19:24:06 -04:00
|
|
|
floats = 0,
|
|
|
|
group_attack = true,
|
|
|
|
replace_rate = 5,
|
|
|
|
replace_what = {"default:torch"},
|
|
|
|
replace_with = "air",
|
|
|
|
replace_offset = -1,
|
|
|
|
peaceful = false,
|
|
|
|
drops = {
|
|
|
|
{name = "farming:string",
|
|
|
|
chance = 1, min = 1, max = 5,},
|
2017-05-22 22:27:00 -04:00
|
|
|
{name = "mobs_mc:spider_eye",
|
2016-05-19 19:24:06 -04:00
|
|
|
chance = 1, min = 0, max = 1,},
|
2016-07-19 21:21:47 -04:00
|
|
|
{name = "mobs_mc:spider_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
|
|
|
},
|
|
|
|
water_damage = 5,
|
|
|
|
lava_damage = 50,
|
|
|
|
light_damage = 0,
|
|
|
|
fear_height = 14,
|
|
|
|
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
|
|
|
},
|
|
|
|
})
|
2017-06-08 01:29:18 -04:00
|
|
|
mobs:register_spawn("mobs_mc:spider", {"default:stone" ,"default:gravel","default:cobble","default:sand", "group:snappy"}, 4, -1, 17000, 2, 3000)
|
2016-05-19 19:24:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
-- compatibility
|
|
|
|
mobs:alias_mob("mobs:spider", "mobs_mc:spider")
|
|
|
|
mobs:alias_mob("esmobs:spider", "mobs_mc:spider")
|
|
|
|
|
|
|
|
-- spawn eggs
|
2017-05-23 00:35:56 -04:00
|
|
|
--mobs:register_egg("mobs_mc:spider", "Spider", "mobs_cobweb.png", 1)
|
|
|
|
mobs:register_egg("mobs_mc:spider", "Spider", "spider_inv.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
|
2016-05-19 19:24:06 -04:00
|
|
|
minetest.log("action", "MC Spiders loaded")
|
2017-06-14 19:47:33 -04:00
|
|
|
end
|