From 28823298e1536d4ce34d67ada624dcb5aaf377e0 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 8 Apr 2021 10:00:04 -0400 Subject: [PATCH 1/2] Fix forgotten biome check --- mods/ENTITIES/mcl_mobs/spawning.lua | 7 ++++++- mods/ENTITIES/mobs_mc/cow+mooshroom.lua | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index 8665911942..84cb9928a8 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -546,7 +546,7 @@ if mobs_spawn then minetest.register_globalstep(function(dtime) timer = timer + dtime if timer >= 15 then - timer = 0--15--0 + timer = 15--0 for _,player in ipairs(minetest.get_connected_players()) do for i = 1,math.random(5) do @@ -602,6 +602,11 @@ if mobs_spawn then goto continue end + --skip if not in correct biome + if not biome_check(mob_def.biomes, gotten_biome) then + goto continue + end + --add this so mobs don't spawn inside nodes spawning_position.y = spawning_position.y + 1 diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index 656570a83a..48fcc81975 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -176,6 +176,7 @@ mobs_mc.spawn_height.water, mobs_mc.spawn_height.overworld_max) + mobs:spawn_specific( "mobs_mc:mooshroom", "overworld", From 9369c9cab8f25d5fa34fe0cdaeee4f9570db4551 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 8 Apr 2021 10:01:15 -0400 Subject: [PATCH 2/2] Fix spawn timer reset debug --- mods/ENTITIES/mcl_mobs/spawning.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index 84cb9928a8..72b014b273 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -546,7 +546,7 @@ if mobs_spawn then minetest.register_globalstep(function(dtime) timer = timer + dtime if timer >= 15 then - timer = 15--0 + timer = 0--15 for _,player in ipairs(minetest.get_connected_players()) do for i = 1,math.random(5) do