MineClone5-FlamingRCCars/mods/mobs/init.lua

35 lines
1.3 KiB
Lua
Raw Normal View History

local init = os.clock()
2015-06-29 19:55:56 +02:00
dofile(minetest.get_modpath("mobs").."/api.lua")
-- Items
dofile(minetest.get_modpath("mobs").."/item.lua")
-- Mouton
dofile(minetest.get_modpath("mobs").."/sheep.lua")
-- Zombie
dofile(minetest.get_modpath("mobs").."/zombie.lua")
-- Slime
dofile(minetest.get_modpath("mobs").."/slime.lua")
-- Creeper
dofile(minetest.get_modpath("mobs").."/creeper.lua")
-- Spider
dofile(minetest.get_modpath("mobs").."/spider.lua")
if minetest.setting_getbool("spawn_friendly_mobs") ~= false then -- “If not defined or set to true then”
2017-01-09 00:50:58 +01:00
mobs:register_spawn("mobs:sheep", "Sheep", {"default:dirt_with_grass"},16, 8, 2, 250, 100)
end
if minetest.setting_getbool("spawn_hostile_mobs") ~= false then -- “If not defined or set to true then”
2017-01-09 00:50:58 +01:00
mobs:register_spawn("mobs:slime", "Slime", { "default:dirt_with_grass"}, 20, 1, 11, 80, 0)
mobs:register_spawn("mobs:zombie", "Zombie", {"default:stone", "default:dirt", "default:dirt_with_grass", "default:sand"}, 1, -1, 7, 80, 0)
mobs:register_spawn("mobs:spider", "Spider", {"default:stone", "default:dirt", "default:dirt_with_grass", "default:sand"}, 1, -1, 7, 40, 0)
2015-06-29 19:55:56 +02:00
end
local time_to_load= os.clock() - init
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))