From 366a2125b8f4eed1bf710365d2c3cf3bf6191e66 Mon Sep 17 00:00:00 2001 From: Duane Date: Thu, 4 Aug 2016 00:42:18 -0500 Subject: [PATCH] Correct snowy village surface and crater terrain problem. --- cavegen.lua | 2 +- village.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cavegen.lua b/cavegen.lua index f36ff9f..dcea3b3 100644 --- a/cavegen.lua +++ b/cavegen.lua @@ -49,7 +49,7 @@ fun_caves.cavegen = function(minp, maxp, data, area, node, heightmap, underzone, local height = heightmap[index] if crater then local dist = crater.y - math.sqrt((x - crater.x) ^ 2 + (z - crater.z) ^ 2) - if dist > 0 and (height > maxp.y or height < minp.y + crater.y) then + if dist > 0 and (height > maxp.y - 20 or height < minp.y + crater.y) then crater = nil end if crater and dist > 0 and dist <= 1 and crater_min > height then diff --git a/village.lua b/village.lua index be990b2..b72fe7e 100644 --- a/village.lua +++ b/village.lua @@ -246,6 +246,8 @@ fun_caves.village = function(minp, maxp, data, p2data, area, node, biome, height if turf == 'default:dirt_with_snow' then if math.random(10) == 1 then data[ivm] = node['default:dry_shrub'] + else + data[ivm] = node['air'] end elseif farming then data[ivm] = node['farming:wheat_'..math.random(7)]