From d7817ae133feba4f4edee70050d594e976f9cdd7 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 2 Aug 2015 20:30:05 +0200 Subject: [PATCH] 'Divided' chances for a wrecked boat to appear - (I hope I got the algorithm right) - Solves #188 --- mods/sea/seawrecks/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/sea/seawrecks/init.lua b/mods/sea/seawrecks/init.lua index e698226e..39bf1c33 100755 --- a/mods/sea/seawrecks/init.lua +++ b/mods/sea/seawrecks/init.lua @@ -169,7 +169,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1) local pr = PseudoRandom(seed) local num_chunks = math.floor(chunks_per_volume * volume) - local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk) + local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk) * 10 for i=1,num_chunks do local y0 = pr:next(y_min, y_max-chunk_size+1) if y0 >= height_min and y0 <= height_max then