forked from VoxeLibre/VoxeLibre
implement y_min and y_max, make netherite rarer
This commit is contained in:
parent
e772bd12f0
commit
89b025cae8
|
@ -21,6 +21,7 @@ local function is_occluded(pos,dp)
|
|||
end
|
||||
|
||||
function mcl_secret_ores.on_dig(pos, oldnode,def)
|
||||
if (def.y_min and pos.y < def.y_min) or ( def.y_max and pos.y > def.y_max ) then return end
|
||||
for k,v in pairs(adjacents) do
|
||||
local p=vector.add(pos,v)
|
||||
local n=minetest.get_node_or_nil(p)
|
||||
|
@ -53,11 +54,13 @@ minetest.register_on_mods_loaded(function()
|
|||
end)
|
||||
|
||||
mcl_secret_ores.register_ore({
|
||||
wherein = {"mcl_nether:netherrack"},
|
||||
wherein = {"mcl_nether:netherrack","mcl_blackstone:blackstone","mcl_blackstone:basalt"},
|
||||
ore = "mcl_nether:ancient_debris",
|
||||
y_min = mcl_vars.mg_nether_min,
|
||||
y_max = mcl_vars.mg_nether_lava_max,
|
||||
randomfunc = function(p)
|
||||
p = vector.round(p)
|
||||
local pr = PseudoRandom(p.x*p.y*p.z)
|
||||
if pr:next(1,1000) == 1 then return true end
|
||||
if pr:next(1,5000) == 1 then return true end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
name = mcl_secret_ores
|
||||
author = cora
|
||||
depends = mcl_init
|
||||
|
|
Loading…
Reference in New Issue