From c8fdc7169580cb7bd2101df20527ab528b527741 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Thu, 4 Jan 2018 10:59:54 +0100 Subject: [PATCH] Issue with generic ores #5 fixed --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a912ac2..0c81b20 100644 --- a/init.lua +++ b/init.lua @@ -54,7 +54,10 @@ local function add_ores() for _,item in pairs(minetest.registered_ores) do if minetest.registered_nodes[item.ore] then local drop = minetest.registered_nodes[item.ore].drop - if type(drop) == "string" and drop ~= item.ore then + if type(drop) == "string" + and item.ore_type == "scatter" + and item.clust_scarcity ~= nil and item.clust_scarcity > 0 + and item.clust_size ~= nil and item.clust_size > 0 then local probability = item.clust_scarcity / item.clust_size / PROBABILITY_FACTOR * gravelsieve.ore_rarity probability = math.floor(probability)