1
0
Fork 0

Limit spawning of mobs outside y axis as well

This commit is contained in:
ancientmarinerdev 2023-01-31 18:13:36 +00:00 committed by Gitea
parent b817c079ba
commit bf50a17f2e
1 changed files with 1 additions and 1 deletions

View File

@ -815,7 +815,7 @@ if mobs_spawn then
repeat repeat
local goal_pos = get_next_mob_spawn_pos(pos) local goal_pos = get_next_mob_spawn_pos(pos)
if math.abs(goal_pos.x) <= SPAWN_MAPGEN_LIMIT and math.abs(goal_pos.z) <= SPAWN_MAPGEN_LIMIT then if math.abs(goal_pos.x) <= SPAWN_MAPGEN_LIMIT and math.abs(pos.y) <= SPAWN_MAPGEN_LIMIT and math.abs(goal_pos.z) <= SPAWN_MAPGEN_LIMIT then
local spawning_position_list = find_nodes_in_area_under_air( local spawning_position_list = find_nodes_in_area_under_air(
{x = goal_pos.x, y = y_min, z = goal_pos.z}, {x = goal_pos.x, y = y_min, z = goal_pos.z},
{x = goal_pos.x, y = y_max, z = goal_pos.z}, {x = goal_pos.x, y = y_max, z = goal_pos.z},