Change mobs spawning chance

This commit is contained in:
Maksim Gamarnik 2018-09-01 01:04:58 +02:00
parent b75c72f95e
commit 13929d3d44
12 changed files with 31 additions and 34 deletions

View File

@ -92,8 +92,9 @@
mobs:spawn({ mobs:spawn({
name = "mobs_animal:bear", name = "mobs_animal:bear",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 0, min_light = 0,
interval = 30,
chance = 15000, chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,

View File

@ -100,12 +100,9 @@ mobs:register_mob("mobs_animal:bunny", {
damage = 5, damage = 5,
}) })
local spawn_on = {"default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
mobs:spawn({ mobs:spawn({
name = "mobs_animal:bunny", name = "mobs_animal:bunny",
nodes = {spawn_on}, nodes = {"default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 10, min_light = 10,
interval = 30, interval = 30,
chance = 8000, chance = 8000,

View File

@ -80,15 +80,14 @@ mobs:register_mob("mobs_animal:chicken", {
end, end,
}) })
local spawn_on = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
mobs:spawn({ mobs:spawn({
name = "mobs_animal:chicken", name = "mobs_animal:chicken",
nodes = {spawn_on}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 8000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -109,10 +109,10 @@ mobs:register_mob("mobs_animal:cow", {
mobs:spawn({ mobs:spawn({
name = "mobs_animal:cow", name = "mobs_animal:cow",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 10000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,

View File

@ -59,8 +59,9 @@
mobs:spawn({ mobs:spawn({
name = "mobs_animal:wolf", name = "mobs_animal:wolf",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 0, min_light = 0,
interval = 30,
chance = 15000, chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,

View File

@ -48,13 +48,10 @@ mobs:register_mob("mobs_animal:kitten", {
end end
}) })
local spawn_on = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
mobs:spawn({ mobs:spawn({
name = "mobs_animal:kitten", name = "mobs_animal:kitten",
nodes = {spawn_on}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 12, min_light = 10,
interval = 30, interval = 30,
chance = 10000, chance = 10000,
min_height = 0, min_height = 0,

View File

@ -56,8 +56,9 @@ mobs:register_mob("mobs_animal:pig", {
mobs:spawn({ mobs:spawn({
name = "mobs_animal:pig", name = "mobs_animal:pig",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30,
chance = 15000, chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,

View File

@ -185,10 +185,10 @@ end
mobs:spawn({ mobs:spawn({
name = "mobs_animal:sheep_white", name = "mobs_animal:sheep_white",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 20000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,
@ -196,10 +196,10 @@ mobs:spawn({
mobs:spawn({ mobs:spawn({
name = "mobs_animal:sheep_grey", name = "mobs_animal:sheep_grey",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 20000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,
@ -207,9 +207,9 @@ mobs:spawn({
mobs:spawn({ mobs:spawn({
name = "mobs_animal:sheep_dark_grey", name = "mobs_animal:sheep_dark_grey",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
interval = 30, interval = 30,
chance = 8000, chance = 20000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,
@ -217,10 +217,10 @@ mobs:spawn({
mobs:spawn({ mobs:spawn({
name = "mobs_animal:sheep_black", name = "mobs_animal:sheep_black",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 20000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,
@ -228,10 +228,10 @@ mobs:spawn({
mobs:spawn({ mobs:spawn({
name = "mobs_animal:sheep_brown", name = "mobs_animal:sheep_brown",
nodes = {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, interval = 30,
chance = 8000, chance = 20000,
min_height = 0, min_height = 0,
max_height = 31000, max_height = 31000,
day_toggle = true, day_toggle = true,

View File

@ -53,7 +53,7 @@ mobs:register_mob("mobs_monster:skeleton", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:skeleton", name = "mobs_monster:skeleton",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
min_light = 0, min_light = 0,
max_light = 10, max_light = 10,
chance = 7000, chance = 7000,

View File

@ -60,10 +60,11 @@ mobs:register_mob("mobs_monster:spider", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:spider", name = "mobs_monster:spider",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
min_light = 0, min_light = 0,
max_light = 12, max_light = 12,
chance = 7000, interval = 30,
chance = 10000,
min_height = -50, min_height = -50,
max_height = 31000, max_height = 31000,
}) })
@ -134,11 +135,11 @@ mobs:register_mob("mobs_monster:small_spider", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:small_spider", name = "mobs_monster:small_spider",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
min_light = 0, min_light = 0,
max_light = 15, max_light = 15,
interval = 30, interval = 30,
chance = 8000, chance = 10000,
min_height = -50, min_height = -50,
max_height = 31000, max_height = 31000,
}) })

View File

@ -54,7 +54,7 @@ mobs:register_mob("mobs_monster:zombie", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:zombie", name = "mobs_monster:zombie",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
min_light = 0, min_light = 0,
max_light = 10, max_light = 10,
chance = 7000, chance = 7000,

View File

@ -2991,7 +2991,7 @@ minetest.register_entity(name, {
jump_height = def.jump_height or 4, -- was 6 jump_height = def.jump_height or 4, -- was 6
drawtype = def.drawtype, -- DEPRECATED, use rotate instead drawtype = def.drawtype, -- DEPRECATED, use rotate instead
rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2 rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2
lifetimer = def.lifetimer or 180, -- 3 minutes lifetimer = def.lifetimer or 1800, -- 30 min
hp_min = max(1, (def.hp_min or 5) * difficulty), hp_min = max(1, (def.hp_min or 5) * difficulty),
hp_max = max(1, (def.hp_max or 10) * difficulty), hp_max = max(1, (def.hp_max or 10) * difficulty),
physical = true, physical = true,