From 4c647d94952c5ac84262cdb2daefb690f5455d5b Mon Sep 17 00:00:00 2001 From: Kimapr Date: Sat, 21 Dec 2019 14:53:02 +0500 Subject: [PATCH] Fix island distribution again --- nc_crystal/init.lua | 4 ++-- nc_sky_isgen/init.lua | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nc_crystal/init.lua b/nc_crystal/init.lua index 1baf862..cfade85 100644 --- a/nc_crystal/init.lua +++ b/nc_crystal/init.lua @@ -74,8 +74,8 @@ nodecore.register_limited_abm({ label = "Lode Crystal growing", nodenames = {ore}, neighbours = {"group:lava"}, - interval = 10, - chance = 10, + interval = 20, + chance = 20, action = function(pos,node) local vdirs = {} for _,off in pairs(growdirs) do diff --git a/nc_sky_isgen/init.lua b/nc_sky_isgen/init.lua index 029cc2b..322d1c8 100644 --- a/nc_sky_isgen/init.lua +++ b/nc_sky_isgen/init.lua @@ -229,9 +229,8 @@ end local function gen_island_pos(name) local x,y,z = 0,0,0 - x,z = x+math.random(-32,32),z+math.random(-32,32) - y=256+math.random(-64,64) - local ok = checkpos(x,y,z) + x,z = x+math.random(-64,64),z+math.random(-64,64) + y=256+math.random(-32,32) for k,isl in ipairs(cells) do if isl and isl.valid then table.remove(cells,k) @@ -245,9 +244,10 @@ local function gen_island_pos(name) return end end + local ok = checkpos(x,y,z) while not ok do - x,z = x+math.random(-32,32),z+math.random(-32,32) - y=256+math.random(-64,64) + x,z = x+math.random(-64,64),z+math.random(-64,64) + y=256+math.random(-32,32) ok = checkpos(x,y,z) end local ip = {x=x,y=y,z=z}