2017-05-25 20:39:12 -04:00
|
|
|
--MCmobs v0.4
|
2017-05-22 22:27:00 -04:00
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
|
|
|
--###################
|
2017-06-24 22:37:17 +02:00
|
|
|
--################### OCELOT AND CAT
|
2017-05-22 22:27:00 -04:00
|
|
|
--###################
|
|
|
|
|
2017-05-23 19:03:37 -04:00
|
|
|
mobs:register_mob("mobs_mc:ocelot", {
|
2017-05-22 22:27:00 -04:00
|
|
|
type = "animal",
|
2017-06-14 19:47:33 -04:00
|
|
|
hp_min = 10,
|
|
|
|
hp_max = 10,
|
2017-06-24 22:28:56 +02:00
|
|
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},
|
|
|
|
rotate = -180,
|
2017-05-22 22:27:00 -04:00
|
|
|
visual = "mesh",
|
2017-06-24 22:37:17 +02:00
|
|
|
mesh = "mobs_mc_cat.b3d",
|
|
|
|
textures = {"mobs_mc_cat_ocelot.png"},
|
2017-06-24 22:28:56 +02:00
|
|
|
visual_size = {x=2.0, y=2.0},
|
2017-05-22 22:27:00 -04:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
walk_velocity = 1,
|
2017-05-25 20:39:12 -04:00
|
|
|
run_velocity = 3,
|
2017-05-22 22:27:00 -04:00
|
|
|
drawtype = "front",
|
2017-06-24 22:28:56 +02:00
|
|
|
floats = 1,
|
|
|
|
water_damage = 0,
|
|
|
|
lava_damage = 4,
|
2017-05-22 22:27:00 -04:00
|
|
|
light_damage = 0,
|
2017-06-24 22:28:56 +02:00
|
|
|
fear_height = 4,
|
2017-05-22 22:27:00 -04:00
|
|
|
sounds = {
|
2017-05-23 19:03:37 -04:00
|
|
|
random = "mobs_kitten",
|
2017-05-22 22:27:00 -04:00
|
|
|
},
|
|
|
|
animation = {
|
2017-05-23 19:03:37 -04:00
|
|
|
speed_normal = 25, speed_run = 50,
|
|
|
|
stand_start = 0, stand_end = 0,
|
|
|
|
walk_start = 0, walk_end = 40,
|
|
|
|
run_start = 0, run_end = 40,
|
2017-06-24 22:28:56 +02:00
|
|
|
distance = 16,
|
2017-05-22 22:27:00 -04:00
|
|
|
},
|
2017-06-23 18:26:00 +02:00
|
|
|
follow = mobs_mc.follow.ocelot,
|
2017-06-14 19:47:33 -04:00
|
|
|
view_range = 12,
|
2017-05-23 19:03:37 -04:00
|
|
|
passive = false,
|
|
|
|
attack_type = "dogfight",
|
2017-06-24 22:28:56 +02:00
|
|
|
pathfinding = 1,
|
2017-06-14 19:47:33 -04:00
|
|
|
damage = 2,
|
2017-06-24 22:28:56 +02:00
|
|
|
attack_animals = true,
|
|
|
|
specific_attack = { "mobs_mc:chicken" },
|
2017-05-22 22:27:00 -04:00
|
|
|
})
|
|
|
|
|
2017-05-25 20:39:12 -04:00
|
|
|
--spawn
|
2017-06-24 19:09:38 +02:00
|
|
|
-- TODO: Increase spawn chance if polished
|
|
|
|
mobs:register_spawn("mobs_mc:ocelot", mobs_mc.spawn.jungle, minetest.LIGHT_MAX+1, 0, 20000, 2, 31000)
|
2017-05-22 22:27:00 -04:00
|
|
|
|
|
|
|
-- compatibility
|
2017-05-23 19:03:37 -04:00
|
|
|
mobs:alias_mob("mobs:kitten", "mobs_mc:ocelot")
|
2017-05-22 22:27:00 -04:00
|
|
|
|
2017-05-23 19:03:37 -04:00
|
|
|
-- spawn eggs
|
2017-06-24 22:37:17 +02:00
|
|
|
mobs:register_egg("mobs_mc:ocelot", "Ocelot", "mobs_mc_spawn_icon_cat.png", 0)
|
2017-05-22 22:27:00 -04:00
|
|
|
|
2017-06-21 00:20:06 -04:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2017-05-25 20:39:12 -04:00
|
|
|
minetest.log("action", "MC Ocelot loaded")
|
2017-06-14 19:47:33 -04:00
|
|
|
end
|