forked from VoxeLibre/VoxeLibre
Fix water spawning
This commit is contained in:
parent
6a2109ad68
commit
1986f864e4
|
@ -445,6 +445,7 @@ local function spawn_check(pos,spawn_def)
|
|||
pos.y = pos.y + 1
|
||||
local has_room = #minetest.find_nodes_in_area(pos,vector.offset(pos,0,1,0),{"air"}) or 0 >= 2
|
||||
local is_water = get_item_group(gotten_node, "water") ~= 0
|
||||
local is_water_above = get_item_group(minetest.get_node(pos).name, "water") ~= 0
|
||||
local is_lava = get_item_group(gotten_node, "lava") ~= 0
|
||||
local is_leaf = get_item_group(gotten_node, "leaves") ~= 0
|
||||
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
||||
|
@ -460,6 +461,7 @@ local function spawn_check(pos,spawn_def)
|
|||
and spawn_def.dimension == dimension
|
||||
and biome_check(spawn_def.biomes, gotten_biome)
|
||||
and (is_ground or spawn_def.type_of_spawning ~= "ground")
|
||||
and (spawn_def.type_of_spawning ~= "ground" or ( is_ground and not is_water_above))
|
||||
and (spawn_def.type_of_spawning ~= "ground" or not is_leaf)
|
||||
and (spawn_def.type_of_spawning ~= "ground" or has_room)
|
||||
and (spawn_def.check_position and spawn_def.check_position(pos) or true)
|
||||
|
|
Loading…
Reference in New Issue