From 2a014ca79c75ab96514bbe2ef9fb828645b890cb Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sun, 14 Apr 2024 10:08:49 +0000 Subject: [PATCH] Change y range calculation to use outer zone distance and not middle to let mobs spawn far away from the player --- 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 ce3c21cac..8cac1c672 100755 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -648,7 +648,7 @@ local function get_next_mob_spawn_pos(pos) end -- Calculate upper/lower y limits - local R1 = MOB_SPAWN_ZONE_MIDDLE + local R1 = MOB_SPAWN_ZONE_OUTER local d = vector_distance( pos, vector.new( goal_pos.x, pos.y, goal_pos.z ) ) -- distance from player to projected point on horizontal plane local y1 = math_sqrt( R1*R1 - d*d ) -- absolue value of distance to outer sphere