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

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/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)
local noise = perlin_noise:get_3d(spawning_position)
local current_summary_chance = summary_chance
table.shuffle(mob_library_worker_table)
while #mob_library_worker_table > 0 do
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
local mob_index = 1

View File

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

View File

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