yl_spawnit/petz.lua

744 lines
18 KiB
Lua

-- disable petz spawning
petz.settings.spawn_interval = math.huge
spawnit.register({
entity_name = "petz:bat",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
within = { "breathable airlike" },
on = { "any" },
max_y = 5000,
max_node_light = 5,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dusk,
max_time_of_day = yl_spawnit.dawn,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:beaver",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
within = { "default:river_water_source" },
on = { "any" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:bunny",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 3,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 3,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:butterfly",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = { "any" },
near = { "group:flower" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:calf",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 3,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:camel",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "group:sand", "default:desert_sandstone", "default:sandstone" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:chimp",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = {
"default:dirt_with_rainforest_litter",
"ethereal:jungle_dirt",
"default:jungleleaves",
"moretrees:jungletree_leaves_yellow",
"moretrees:jungletree_leaves_red",
"ethereal:palmleaves",
"moretrees:date_palm_leaves",
"moretrees:palm_leaves",
},
min_y = 0,
max_y = 5000,
min_node_light = 8,
max_in_area = 2,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:clownfish",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
cluster = 3,
within = { "default:water_source" },
on = { "any" },
near = { "group:coral" },
min_y = -100,
max_y = 5000,
min_node_light = 2,
max_in_area = 3,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:dolphin",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
cluster = 1,
within = { "default:water_source" },
on = { "any" },
min_y = -100,
max_y = 5000,
min_node_light = 2,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:ducky",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "group:soil", "group:water" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:elephant",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = {
"default:dirt_with_rainforest_litter",
"default:dirt_with_dry_grass",
"default:dry_dirt",
"default:dry_dirt_with_dry_grass",
"ethereal:dry_dirt",
"ethereal:jungle_dirt",
},
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:elephant_female",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = {
"default:dirt_with_rainforest_litter",
"default:dirt_with_dry_grass",
"default:dry_dirt",
"default:dry_dirt_with_dry_grass",
"ethereal:dry_dirt",
"ethereal:jungle_dirt",
},
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:flamingo",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = {
"default:dirt_with_coniferous_litter",
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dry_dirt",
"default:dry_dirt_with_dry_grass",
},
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 2,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:foxy",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:frog",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter",
"ethereal:bamboo_dirt",
"ethereal:grove_dirt",
"ethereal:jungle_dirt",
"ethereal:prairie_dirt",
"woodsoils:grass_with_leaves_1",
"woodsoils:grass_with_leaves_2",
},
min_y = 0,
max_y = 5000,
min_node_light = 8,
max_in_area = 2,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:gecko",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = {
"default:dirt_with_coniferous_litter",
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dry_dirt",
"default:dry_dirt_with_dry_grass",
},
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:goat",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 3,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:grizzly",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter",
"ethereal:bamboo_dirt",
"ethereal:grove_dirt",
"ethereal:jungle_dirt",
"ethereal:prairie_dirt",
"woodsoils:grass_with_leaves_1",
"woodsoils:grass_with_leaves_2",
},
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:hamster",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = { "group:sand", "default:desert_sandstone", "default:sandstone" },
min_y = 0,
max_y = 5000,
max_in_area = 2,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:hen",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 2,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:kitty",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dusk,
max_time_of_day = yl_spawnit.dawn,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:lamb",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 3,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:leopard",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = { "default:dirt_with_dry_grass", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "ethereal:dry_dirt" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:lion",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = { "default:dirt_with_dry_grass", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "ethereal:dry_dirt" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:moth",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = { "any" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
-- shouldn't spawn
--spawnit.register({
-- entity_name = "petz:mr_pumpkin",
-- groups = { monster = 1 },
-- chance = yl_spawnit.base_chance / 0.1,
-- on = { "group:soil", "group:stone" },
-- max_y = 5000,
-- max_in_area = 1,
-- max_any_in_area = 6,
-- min_player_distance = 12,
-- spawn_in_protected = false,
-- should_spawn = function()
-- return os.date("*t").month == 10
-- end,
--}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:panda",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = { "group:soil" },
near = { "ethereal:bamboo", "ethereal:bamboo_leaves", "ethereal:bamboo_sprout" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:parrot",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = { "any" },
near = {
"default:jungleleaves",
"moretrees:jungletree_leaves_yellow",
"moretrees:jungletree_leaves_red",
"ethereal:palmleaves",
"moretrees:date_palm_leaves",
"moretrees:palm_leaves",
},
min_y = 0,
max_y = 5000,
min_node_light = 10,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:penguin",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
cluster = 1,
on = { "default:snowblock", "default:ice" },
min_y = 0,
max_y = 10,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:pigeon",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "any" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:piggy",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 3,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 3,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:polar_bear",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = { "default:snowblock", "default:ice", "default:dirt_with_snow", "default:snow" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:pony",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
cluster = 5,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 5,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:puppy",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:queen_ant",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.4,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:queen_bee",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.4,
on = { "any" },
near = { "group:flower" },
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:rat",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance / 0.2,
on = { "group:soil", "group:stone", "rainbow_source:black_water_source" },
max_y = 5000,
max_node_light = 10,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
-- killer santa shouldn't spawn
--spawnit.register({
-- entity_name = "petz:santa_killer",
-- groups = { monster = 1 },
-- chance = yl_spawnit.base_chance / 0.1,
-- on = { "default:snowblock", "default:ice", "default:dirt_with_snow", "default:snow" },
-- min_y = -32,
-- max_y = 10,
-- max_in_area = 1,
-- max_any_in_area = 6,
-- min_player_distance = 12,
-- spawn_in_protected = false,
-- should_spawn = function()
-- return os.date("*t").month == 12
-- end,
--}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:silkworm",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
on = { "group:leaves" },
min_y = 0,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:snow_leopard",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = { "default:snowblock", "default:ice", "default:dirt_with_snow", "default:snow" },
min_y = 20,
max_y = 5000,
max_in_area = 1,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:squirrel",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
cluster = 3,
on = { "group:leaves", "group:tree" },
min_y = 0,
max_y = 5000,
min_node_light = 8,
max_in_area = 3,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:tarantula",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
on = {
"group:stone",
"default:dirt_with_rainforest_litter",
"ethereal:jungle_dirt",
"default:jungleleaves",
"moretrees:jungletree_leaves_yellow",
"moretrees:jungletree_leaves_red",
"ethereal:palmleaves",
"moretrees:date_palm_leaves",
"moretrees:palm_leaves",
},
max_y = 5000,
max_in_area = 3,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:toucan",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.8,
on = { "any" },
near = {
"default:jungleleaves",
"moretrees:jungletree_leaves_yellow",
"moretrees:jungletree_leaves_red",
"ethereal:palmleaves",
"moretrees:date_palm_leaves",
"moretrees:palm_leaves",
},
min_y = 0,
max_y = 5000,
min_node_light = 12,
max_in_area = 1,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:tropicalfish",
groups = { animal = 1 },
chance = yl_spawnit.base_chance,
within = { "default:water_source" },
on = { "any" },
near = { "group:coral" },
min_y = -100,
max_y = 5000,
min_node_light = 2,
max_in_area = 2,
max_any_in_area = 6,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:turtle",
groups = { animal = 1 },
chance = yl_spawnit.base_chance / 0.6,
within = { "group:water" },
on = { "any" },
min_y = -100,
max_y = 5000,
min_node_light = 8,
max_in_area = 2,
max_any_in_area = 6,
min_time_of_day = yl_spawnit.dawn,
max_time_of_day = yl_spawnit.dusk,
spawn_in_protected = true,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "petz:wolf",
groups = { animal = 1, hostile = 1 },
chance = yl_spawnit.base_chance,
cluster = 4,
on = { "group:soil" },
min_y = 0,
max_y = 5000,
max_in_area = 4,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)