Merge remote-tracking branch 'origin/compatibility' into production-compatible

This commit is contained in:
kay27 2022-02-02 04:18:13 +04:00
commit a2f464c67f
2 changed files with 10 additions and 2 deletions

View File

@ -1228,7 +1228,7 @@ local void_layers = {
} }
local bedrock_layers = {} local bedrock_layers = {}
if not singlelayer then if not singlenode then
bedrock_layers = { bedrock_layers = {
{mcl_mapgen.overworld.bedrock_min , mcl_mapgen.overworld.bedrock_max }, {mcl_mapgen.overworld.bedrock_min , mcl_mapgen.overworld.bedrock_max },
{mcl_mapgen.nether.bedrock_bottom_min, mcl_mapgen.nether.bedrock_bottom_max}, {mcl_mapgen.nether.bedrock_bottom_min, mcl_mapgen.nether.bedrock_bottom_max},

View File

@ -46,7 +46,15 @@ local function update_player(player_object)
end end
local air = #find_nodes_in_area({x = x, y = feet_y, z = z}, {x = x + 1, y = feet_y + 1, z = z + 1}, "air") == 8 local air = #find_nodes_in_area({x = x, y = feet_y, z = z}, {x = x + 1, y = feet_y + 1, z = z + 1}, "air") == 8
and #get_objects_inside_radius({x = pos.x, y = pos.y - 0.6, z = pos.z}, 1.3) > 1 if air then
local objects = get_objects_inside_radius({x = pos.x, y = pos.y - 0.6, z = pos.z}, 1.3)
for _, obj in pairs(objects) do
if not obj:is_player() and obj:get_luaentity() and obj:get_luaentity()._cmi_is_mob then
air = false
break
end
end
end
local noclip = #find_nodes_in_area({x = x, y = head_y, z = z}, {x = x + 1, y = head_y + 1, z = z + 1}, "group:opaque") == 8 local noclip = #find_nodes_in_area({x = x, y = head_y, z = z}, {x = x + 1, y = head_y + 1, z = z + 1}, "group:opaque") == 8