mobs_mc/ocelot.lua

98 lines
2.2 KiB
Lua
Raw Normal View History

2017-05-25 20:39:12 -04:00
--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")
2017-05-25 20:39:12 -04:00
--###################
--################### OCELOT - CAT
--###################
2017-05-23 19:03:37 -04:00
--[[
mobs:register_mob("mobs_mc:5ocelot", {
type = "animal",
passive = true,
runaway = true,
stepheight = 1.2,
hp_min = 30,
hp_max = 60,
armor = 150,
2017-05-23 19:03:37 -04:00
--collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35},
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
rotate = -180,
visual = "mesh",
mesh = "cat.b3d",
textures = {{"cat.png"},{"cat1.png"},{"cat2.png"},{"cat3.png"},{"cat4.png"}},
visual_size = {x=3, y=3},
walk_velocity = 0.6,
run_velocity = 2,
jump = true,
animation = {
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40,
},
})
mobs:register_egg("mobs_mc:5ocelot", "Ocelot", "cat_inv.png", 0)
2017-05-23 19:03:37 -04:00
]]
2017-05-23 19:03:37 -04:00
--mcocelot
mobs:register_mob("mobs_mc:ocelot", {
type = "animal",
hp_max = 25,
2017-05-23 19:03:37 -04:00
--collisionbox = {-0.268, -0.02, -0.268, 0.268, -0.5, 0.268},
collisionbox = {-0.3, -0.03, -0.3, 0.3, 0.4, 0.3},
rotate = -180,
visual = "mesh",
2017-05-23 19:03:37 -04:00
mesh = "cat.b3d",
textures = {{"cat.png"},{"cat1.png"},{"cat2.png"},{"cat3.png"},{"cat4.png"}},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
walk_velocity = 1,
2017-05-25 20:39:12 -04:00
run_velocity = 3,
armor = 90,
drops = {
2017-05-23 19:03:37 -04:00
},
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 3,
sounds = {
2017-05-23 19:03:37 -04:00
random = "mobs_kitten",
--death = "Sheep3",
--damage = "Sheep3",
},
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-05-23 19:03:37 -04:00
follow = "fishing:fish_raw",
view_range = 5,
2017-05-23 19:03:37 -04:00
passive = false,
attack_type = "dogfight",
pathfinding = true,
damage = 5,
attacks_monsters = true,
})
2017-05-25 20:39:12 -04:00
--spawn
2017-05-28 23:16:44 -04:00
mobs:register_spawn("mobs_mc:ocelot", {"default:dirt_with_dry__grass"}, 20, 12, 15000, 2, 31000)
-- compatibility
2017-05-23 19:03:37 -04:00
mobs:alias_mob("mobs:kitten", "mobs_mc:ocelot")
2017-05-23 19:03:37 -04:00
-- spawn eggs
mobs:register_egg("mobs_mc:ocelot", "Ocelot", "cat_inv.png", 0)
if minetest.setting_get("log_mods") then
2017-05-25 20:39:12 -04:00
minetest.log("action", "MC Ocelot loaded")
end