mirror of
https://github.com/ElCeejo/animalia.git
synced 2025-09-22 11:26:43 -04:00
Smarter mapgen spawning, crash fix, more settings
This commit is contained in:
parent
7e240b5bd8
commit
69e96a6b82
13 changed files with 318 additions and 246 deletions
25
mobs/cat.lua
25
mobs/cat.lua
|
@ -303,27 +303,4 @@ animalia.register_mob("cat", {
|
|||
end
|
||||
})
|
||||
|
||||
mob_core.register_spawn_egg("animalia:cat", "db9764" ,"cf8d5a")
|
||||
|
||||
local house_nodes = {}
|
||||
|
||||
minetest.register_on_mods_loaded(function()
|
||||
for name in pairs(minetest.registered_nodes) do
|
||||
if minetest.get_item_group(name, "stairs") > 0
|
||||
or minetest.get_item_group(name, "wood") > 0 then
|
||||
table.insert(house_nodes, name)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:cat",
|
||||
nodes = house_nodes,
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
min_rad = 24,
|
||||
max_rad = 256,
|
||||
group = 0,
|
||||
}, animalia.spawn_interval, 1)
|
||||
mob_core.register_spawn_egg("animalia:cat", "db9764" ,"cf8d5a")
|
|
@ -135,7 +135,7 @@ animalia.register_mob("chicken", {
|
|||
},
|
||||
drops = {
|
||||
{name = "animalia:feather", chance = 1, min = 1, max = 2},
|
||||
{name = "animalia:chicken_raw", chance = 1, min = 1, max = 4}
|
||||
{name = "animalia:poultry_raw", chance = 1, min = 1, max = 4}
|
||||
},
|
||||
-- Functions
|
||||
head_data = {
|
||||
|
@ -161,23 +161,6 @@ animalia.register_mob("chicken", {
|
|||
|
||||
mob_core.register_spawn_egg("animalia:chicken", "c6c6c6", "d22222")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:chicken",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
min_rad = 24,
|
||||
max_rad = 256,
|
||||
group = 6,
|
||||
optional = {
|
||||
biomes = {
|
||||
unpack(animalia.grassland_biomes),
|
||||
unpack(animalia.tropical_biomes)
|
||||
}
|
||||
}
|
||||
}, animalia.spawn_interval, 4)
|
||||
|
||||
minetest.register_craftitem("animalia:poultry_raw", {
|
||||
description = "Raw Poultry",
|
||||
inventory_image = "animalia_poultry_raw.png",
|
||||
|
|
14
mobs/cow.lua
14
mobs/cow.lua
|
@ -244,16 +244,4 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
|
||||
mob_core.register_spawn_egg("animalia:cow", "cac3a1" ,"464438")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:cow",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
group = 3,
|
||||
optional = {
|
||||
biomes = animalia.grassland_biomes
|
||||
}
|
||||
}, animalia.spawn_interval, 2)
|
||||
mob_core.register_spawn_egg("animalia:cow", "cac3a1" ,"464438")
|
|
@ -280,16 +280,4 @@ animalia.register_mob("horse", {
|
|||
end
|
||||
})
|
||||
|
||||
mob_core.register_spawn_egg("animalia:horse", "ebdfd8" ,"653818")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:horse",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
group = 6,
|
||||
optional = {
|
||||
biomes = animalia.grassland_biomes
|
||||
}
|
||||
}, animalia.spawn_interval, 8)
|
||||
mob_core.register_spawn_egg("animalia:horse", "ebdfd8" ,"653818")
|
19
mobs/pig.lua
19
mobs/pig.lua
|
@ -161,21 +161,4 @@ minetest.register_craft({
|
|||
output = "animalia:porkchop_cooked",
|
||||
})
|
||||
|
||||
mob_core.register_spawn_egg("animalia:pig", "e0b1a7" ,"cc9485")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:pig",
|
||||
nodes = {"default:dirt_with_grass"},
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
group = 3,
|
||||
optional = {
|
||||
biomes = {
|
||||
unpack(animalia.grassland_biomes),
|
||||
unpack(animalia.temperate_biomes),
|
||||
unpack(animalia.boreal_biomes)
|
||||
}
|
||||
}
|
||||
}, animalia.spawn_interval, 4)
|
||||
mob_core.register_spawn_egg("animalia:pig", "e0b1a7" ,"cc9485")
|
|
@ -261,20 +261,6 @@ animalia.register_mob("sheep", {
|
|||
|
||||
mob_core.register_spawn_egg("animalia:sheep", "f4e6cf", "e1ca9b")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:sheep",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
min_rad = 24,
|
||||
max_rad = 256,
|
||||
group = 6,
|
||||
optional = {
|
||||
biomes = animalia.grassland_biomes
|
||||
}
|
||||
}, animalia.spawn_interval, 4)
|
||||
|
||||
minetest.register_craftitem("animalia:mutton_raw", {
|
||||
description = "Raw Mutton",
|
||||
inventory_image = "animalia_mutton_raw.png",
|
||||
|
|
|
@ -143,18 +143,4 @@ animalia.register_mob("turkey", {
|
|||
end,
|
||||
})
|
||||
|
||||
mob_core.register_spawn_egg("animalia:turkey", "352b22", "2f2721")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:turkey",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
min_rad = 24,
|
||||
max_rad = 256,
|
||||
group = 6,
|
||||
optional = {
|
||||
biomes = animalia.temperate_biomes
|
||||
}
|
||||
}, animalia.spawn_interval, 6)
|
||||
mob_core.register_spawn_egg("animalia:turkey", "352b22", "2f2721")
|
|
@ -222,16 +222,4 @@ animalia.register_mob("wolf", {
|
|||
end
|
||||
})
|
||||
|
||||
mob_core.register_spawn_egg("animalia:wolf", "a19678" ,"231b13")
|
||||
|
||||
mob_core.register_spawn({
|
||||
name = "animalia:wolf",
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
min_height = -31000,
|
||||
max_height = 31000,
|
||||
group = 4,
|
||||
optional = {
|
||||
biomes = animalia.temperate_biomes
|
||||
}
|
||||
}, animalia.spawn_interval, 4)
|
||||
mob_core.register_spawn_egg("animalia:wolf", "a19678" ,"231b13")
|
Loading…
Add table
Add a link
Reference in a new issue