1
0
Fork 0

Merge pull request 'Fix horse and wolf spawning biomes' (#2316) from spawning_biomes into master

Reviewed-on: MineClone2/MineClone2#2316
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
cora 2022-06-15 03:07:51 +00:00
commit deeb7ce919
3 changed files with 22 additions and 53 deletions

View File

@ -426,6 +426,7 @@ if mobs_spawn then
perlin_noise = perlin_noise or minetest_get_perlin(noise_params) perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
local noise = perlin_noise:get_3d(spawning_position) local noise = perlin_noise:get_3d(spawning_position)
local current_summary_chance = summary_chance local current_summary_chance = summary_chance
table.shuffle(mob_library_worker_table)
while #mob_library_worker_table > 0 do while #mob_library_worker_table > 0 do
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1 local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
local mob_index = 1 local mob_index = 1

View File

@ -542,41 +542,14 @@ mcl_mobs:spawn_specific(
"ground", "ground",
{ {
"flat", "flat",
"IcePlainsSpikes",
"ColdTaiga",
"ColdTaiga_beach",
"ColdTaiga_beach_water",
"MegaTaiga",
"MegaSpruceTaiga",
"ExtremeHills",
"ExtremeHills_beach",
"ExtremeHillsM",
"ExtremeHills+",
"ExtremeHills+_snowtop",
"StoneBeach",
"Plains", "Plains",
"Plains_beach", "Plains_beach",
"SunflowerPlains", "SunflowerPlains",
"Taiga",
"Taiga_beach",
"Forest",
"Forest_beach",
"FlowerForest",
"FlowerForest_beach",
"BirchForest",
"BirchForestM",
"RoofedForest",
"Savanna", "Savanna",
"Savanna_beach", "Savanna_beach",
"SavannaM", "SavannaM",
"Jungle", "Savanna_beach",
"Jungle_shore", "Plains_beach",
"JungleM",
"JungleM_shore",
"JungleEdge",
"JungleEdgeM",
"Swampland",
"Swampland_shore"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
@ -586,18 +559,20 @@ minetest.LIGHT_MAX+1,
mobs_mc.water_level+3, mobs_mc.water_level+3,
mcl_vars.mg_overworld_max) mcl_vars.mg_overworld_max)
mcl_mobs:spawn_specific( mcl_mobs:spawn_specific(
"mobs_mc:donkey", "mobs_mc:donkey",
"overworld", "overworld",
"ground", "ground",
{ {
"Mesa", "flat",
"MesaPlateauFM_grasstop", "Plains",
"MesaPlateauF", "Plains_beach",
"MesaPlateauFM", "SunflowerPlains",
"MesaPlateauF_grasstop", "Savanna",
"MesaBryce", "Savanna_beach",
"SavannaM",
"Savanna_beach",
"Plains_beach",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,

View File

@ -232,29 +232,22 @@ dog.on_rightclick = function(self, clicker)
end end
mcl_mobs:register_mob("mobs_mc:dog", dog) mcl_mobs:register_mob("mobs_mc:dog", dog)
-- Spawn -- Spawn
mcl_mobs:spawn_specific( mcl_mobs:spawn_specific(
"mobs_mc:wolf", "mobs_mc:wolf",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest", "Taiga",
"Swampland", "MegaSpruceTaiga",
"Taiga", "MegaTaiga",
"ExtremeHills", "Forest",
"BirchForest", "ColdTaiga",
"MegaSpruceTaiga", "FlowerForest_beach",
"MegaTaiga", "Forest_beach",
"ExtremeHills+", "ColdTaiga_beach_water",
"Forest", "Taiga_beach",
"Plains", "ColdTaiga_beach",
"ColdTaiga",
"SunflowerPlains",
"RoofedForest",
"MesaPlateauFM_grasstop",
"ExtremeHillsM",
"BirchForestM",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,