Generate netherrack and ores under the lava

another hack using minetest.generate_ores this time
This commit is contained in:
cora 2022-10-29 03:16:08 +02:00
parent 0f01a28c93
commit fe68e1eaac
3 changed files with 39 additions and 13 deletions

View File

@ -1545,6 +1545,19 @@ local function register_dimension_biomes()
flags = "all_ceilings",
param2 = 0,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"mcl_core:bedrock"},
sidelen = 16,
fill_ratio = 10,
y_min = mcl_vars.mg_nether_min - 10,
y_max = mcl_vars.mg_lava_nether_max,
height = 7,
max_height = 14,
decoration = "mcl_nether:netherrack",
flags = "all_floors,force_placement",
param2 = 0,
})
minetest.register_biome({
@ -1570,7 +1583,7 @@ local function register_dimension_biomes()
sidelen = 16,
fill_ratio = 10,
biomes = { "Nether" },
y_min = -31000,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
decoration = "mcl_nether:netherrack",
flags = "all_floors",
@ -1586,7 +1599,6 @@ local function register_dimension_biomes()
node_river_water = "air",
node_cave_liquid = "air",
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max + 80,
heat_point = 77,
humidity_point = 33,
@ -1599,7 +1611,7 @@ local function register_dimension_biomes()
sidelen = 16,
fill_ratio = 10,
biomes = { "SoulsandValley" },
y_min = -31000,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
decoration = "mcl_blackstone:soul_soil",
flags = "all_floors, all_ceilings",
@ -1614,7 +1626,7 @@ local function register_dimension_biomes()
clust_num_ores = 225,
clust_size = 15,
biomes = { "SoulsandValley" },
y_min = mcl_vars.mg_nether_min,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
noise_params = {
offset = 0,
@ -1636,7 +1648,6 @@ local function register_dimension_biomes()
node_river_water = "air",
node_cave_liquid = "air",
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max + 80,
heat_point = 60,
humidity_point = 47,
@ -1649,7 +1660,7 @@ local function register_dimension_biomes()
sidelen = 16,
fill_ratio = 10,
biomes = { "CrimsonForest" },
y_min = -31000,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
decoration = "mcl_crimson:crimson_nylium",
flags = "all_floors",
@ -1676,7 +1687,7 @@ local function register_dimension_biomes()
sidelen = 16,
fill_ratio = 10,
biomes = { "WarpedForest" },
y_min = -31000,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
decoration = "mcl_crimson:warped_nylium",
flags = "all_floors",
@ -1704,7 +1715,7 @@ local function register_dimension_biomes()
sidelen = 16,
fill_ratio = 10,
biomes = { "BasaltDelta" },
y_min = -31000,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
decoration = "mcl_blackstone:basalt",
flags = "all_floors",
@ -1714,12 +1725,12 @@ local function register_dimension_biomes()
minetest.register_ore({
ore_type = "blob",
ore = "mcl_blackstone:blackstone",
wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel","mcl_nether:soul_sand"},
wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel"},
clust_scarcity = 100,
clust_num_ores = 400,
clust_size = 20,
biomes = { "BasaltDelta" },
y_min = mcl_vars.mg_nether_min,
y_min = mcl_vars.mg_lava_nether_max,
y_max = mcl_vars.mg_nether_deco_max,
noise_params = {
offset = 0,

View File

@ -15,7 +15,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
local t1 = os.clock()
local p1, p2 = {x=minp.x, y=minp.y, z=minp.z}, {x=maxp.x, y=maxp.y, z=maxp.z}
if lvm > 0 then
local lvm_used, shadow, deco_used, deco_table = false, false, false, false
local lvm_used, shadow, deco_used, deco_table, ore_used, ore_table = false, false, false, false, false, false
local lb2 = {} -- param2
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local e1, e2 = {x=emin.x, y=emin.y, z=emin.z}, {x=emax.x, y=emax.y, z=emax.z}
@ -28,7 +28,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
for _, rec in ipairs(registered_generators) do
if rec.vf then
local lvm_used0, shadow0, deco = rec.vf(vm, data, data2, e1, e2, area, p1, p2, blockseed)
local lvm_used0, shadow0, deco, ore = rec.vf(vm, data, data2, e1, e2, area, p1, p2, blockseed)
if lvm_used0 then
lvm_used = true
end
@ -40,6 +40,11 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
elseif deco then
deco_used = true
end
if ore and type(ore) == "table" then
ore_table = ore
elseif deco then
ore_used = true
end
end
end
@ -54,6 +59,11 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
elseif deco_used then
minetest.generate_decorations(vm)
end
if ore_table then
minetest.generate_ores(vm,vector.new(minp.x,ore_table.min,minp.z),vector.new(maxp.x,ore_table.max,maxp.z))
elseif ore_used then
minetest.generate_ores(vm)
end
vm:calc_lighting(p1, p2, shadow)
vm:write_to_map()
vm:update_liquids()

View File

@ -333,10 +333,15 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl
end
end
local deco = false
local ores = false
if minp.y > mcl_vars.mg_nether_deco_max - 64 and maxp.y < mcl_vars.mg_nether_max + 128 then
deco = {min=mcl_vars.mg_nether_deco_max,max=mcl_vars.mg_nether_max}
end
return lvm_used, lvm_used, deco
if minp.y < mcl_vars.mg_nether_min + 10 or maxp.y < mcl_vars.mg_nether_min + 60 then
deco = {min=mcl_vars.mg_nether_min - 10,max=mcl_vars.mg_nether_min + 20}
ores = {min=mcl_vars.mg_nether_min - 10,max=mcl_vars.mg_nether_min + 20}
end
return lvm_used, lvm_used, deco, ores
end
local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blockseed)