Generate floating islands in the End
This commit is contained in:
parent
28a085ae98
commit
29119d2e2c
|
@ -2,6 +2,10 @@
|
|||
|
||||
local TCAVE = 0.6
|
||||
local nobj_cave = nil
|
||||
|
||||
local SPAWN_MIN = mcl_vars.mg_end_min+70
|
||||
local SPAWN_MAX = mcl_vars.mg_end_min+98
|
||||
|
||||
-- 3D noise
|
||||
|
||||
local np_cave = {
|
||||
|
@ -173,13 +177,13 @@ local function build_end_portal(pos, target3)
|
|||
end
|
||||
|
||||
local function find_end_target3_y2(target3_x, target3_z)
|
||||
local start_y = mcl_vars.mg_end_min + math.random(20, 120) -- Search start
|
||||
local start_y = math.random(SPAWN_MIN, SPAWN_MAX) -- Search start
|
||||
if not nobj_cave then
|
||||
nobj_cave = minetest.get_perlin(np_cave)
|
||||
end
|
||||
local air = 0 -- Consecutive air nodes found
|
||||
|
||||
for y = start_y, start_y - 120, -1 do
|
||||
for y = start_y, SPAWN_MIN, -1 do
|
||||
local nval_cave = nobj_cave:get3d({x = target3_x, y = y, z = target3_z})
|
||||
|
||||
if nval_cave > TCAVE then -- Cavern
|
||||
|
|
|
@ -570,12 +570,14 @@ local function register_dimension_biomes()
|
|||
--[[ THE END ]]
|
||||
minetest.register_biome({
|
||||
name = "end",
|
||||
node_stone = "air",
|
||||
node_filler = "mcl_end:end_stone",
|
||||
node_stone = "mcl_end:end_stone",
|
||||
node_water = "mcl_end:end_stone",
|
||||
node_river_water = "air",
|
||||
-- FIXME: For some reason the End stops generating early if this constant is not added.
|
||||
-- Figure out why.
|
||||
y_min = mcl_vars.mg_end_min,
|
||||
y_max = mcl_vars.mg_end_max + 80,
|
||||
y_max = mcl_vars.mg_end_max,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
@ -609,7 +611,7 @@ local function register_biomelike_ores()
|
|||
|
||||
--mcl_core STRATA
|
||||
minetest.register_ore({
|
||||
ore_type = "sheet",
|
||||
ore_type = "blob",
|
||||
ore = "mcl_core:stone",
|
||||
wherein = {"mcl_colorblocks:hardened_clay_orange"},
|
||||
clust_scarcity = 1,
|
||||
|
@ -996,44 +998,46 @@ local function register_dimension_ores()
|
|||
--[[ THE END ]]
|
||||
|
||||
-- Generate fake End
|
||||
-- TODO: Remove both "ores" when there's a better End
|
||||
-- TODO: Remove both "ores" when there's a better End generator
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore_type = "sheet",
|
||||
ore = "mcl_end:end_stone",
|
||||
wherein = {"air", "mcl_core:stone"},
|
||||
clust_scarcity = 30 * 30 * 30,
|
||||
clust_size = 17,
|
||||
y_min = mcl_vars.mg_end_min,
|
||||
y_max = mcl_vars.mg_end_max,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.1,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 16,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
wherein = {"air"},
|
||||
y_min = mcl_vars.mg_end_min+64,
|
||||
y_max = mcl_vars.mg_end_min+94,
|
||||
column_height_min = 6,
|
||||
column_height_max = 7,
|
||||
column_midpoint_factor = 0.0,
|
||||
noise_params = {
|
||||
offset = -2,
|
||||
scale = 8,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 2999,
|
||||
octaves = 5,
|
||||
persist = 0.55,
|
||||
},
|
||||
noise_threshold = 0,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore_type = "sheet",
|
||||
ore = "mcl_end:end_stone",
|
||||
wherein = {"air", "mcl_core:stone"},
|
||||
clust_scarcity = 30 * 30 * 30,
|
||||
clust_size = 34,
|
||||
y_min = mcl_vars.mg_end_min,
|
||||
y_max = mcl_vars.mg_end_max,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.1,
|
||||
spread = {x = 70, y = 15, z = 70},
|
||||
seed = 16,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
wherein = {"air"},
|
||||
y_min = mcl_vars.mg_end_min+64,
|
||||
y_max = mcl_vars.mg_end_min+94,
|
||||
column_height_min = 4,
|
||||
column_height_max = 4,
|
||||
column_midpoint_factor = 0.0,
|
||||
noise_params = {
|
||||
offset = -4,
|
||||
scale = 3,
|
||||
spread = {x=200, y=200, z=200},
|
||||
seed = 5390,
|
||||
octaves = 5,
|
||||
persist = 0.6,
|
||||
},
|
||||
noise_threshold = 0,
|
||||
})
|
||||
|
||||
end
|
||||
|
|
|
@ -1300,7 +1300,11 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
elseif y >= mcl_vars.mg_realm_barrier_overworld_end_min and y <= mcl_vars.mg_realm_barrier_overworld_end_max then
|
||||
data[p_pos] = c_realm_barrier
|
||||
lvm_used = true
|
||||
-- Nether and End support for v6 because v6 does not support the biomes API
|
||||
-- Clear the End
|
||||
elseif y <= mcl_vars.mg_end_max and y >= mcl_vars.mg_end_min then
|
||||
--data[p_pos] = c_air
|
||||
--lvm_used = true
|
||||
-- Nether support for v6 because v6 does not support the biomes API
|
||||
elseif mg_name == "v6" then
|
||||
if y <= mcl_vars.mg_nether_max and y >= mcl_vars.mg_nether_min then
|
||||
if data[p_pos] == c_stone then
|
||||
|
@ -1310,9 +1314,6 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
data[p_pos] = c_soul_sand
|
||||
lvm_used = true
|
||||
end
|
||||
elseif y <= mcl_vars.mg_end_max and y >= mcl_vars.mg_end_min and (data[p_pos] == c_stone or data[p_pos] == c_dirt or data[p_pos] == c_sand) then
|
||||
data[p_pos] = c_end_stone
|
||||
lvm_used = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue