1 skycraft.ores = skycraft.random:new()
2 skycraft.ores:add_choice("mcl_core:cobble", 1000)
3 skycraft.ores:add_choice("mcl_core:stone", 200)
4 skycraft.ores:add_choice("mcl_core:stone_with_coal", 31)
5 skycraft.ores:add_choice("mcl_core:stone_with_iron", 25)
6 skycraft.ores:add_choice("mcl_core:stone_with_gold", 10)
7 skycraft.ores:add_choice("mcl_core:stone_with_lapis", 10)
8 skycraft.ores:add_choice("mcl_core:stone_with_redstone", 10)
9 skycraft.ores:add_choice("mcl_core:stone_with_diamond", 5)
10 skycraft.ores:calc_csum()
12 for k, v in pairs(minetest.registered_abms) do
13 if v.label == "Lava cooling" then
14 local old_func = v.action
15 v.action = function(pos, node, active_object_count, active_object_count_wider)
16 old_func(pos, node, active_object_count, active_object_count_wider)
17 if minetest.get_node(pos).name == "mcl_core:cobble" then
18 minetest.set_node(pos, {name = skycraft.ores:choose()})