Generate floating islands in the End
This commit is contained in:
parent
28a085ae98
commit
29119d2e2c
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
local TCAVE = 0.6
|
local TCAVE = 0.6
|
||||||
local nobj_cave = nil
|
local nobj_cave = nil
|
||||||
|
|
||||||
|
local SPAWN_MIN = mcl_vars.mg_end_min+70
|
||||||
|
local SPAWN_MAX = mcl_vars.mg_end_min+98
|
||||||
|
|
||||||
-- 3D noise
|
-- 3D noise
|
||||||
|
|
||||||
local np_cave = {
|
local np_cave = {
|
||||||
|
@ -173,13 +177,13 @@ local function build_end_portal(pos, target3)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function find_end_target3_y2(target3_x, target3_z)
|
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
|
if not nobj_cave then
|
||||||
nobj_cave = minetest.get_perlin(np_cave)
|
nobj_cave = minetest.get_perlin(np_cave)
|
||||||
end
|
end
|
||||||
local air = 0 -- Consecutive air nodes found
|
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})
|
local nval_cave = nobj_cave:get3d({x = target3_x, y = y, z = target3_z})
|
||||||
|
|
||||||
if nval_cave > TCAVE then -- Cavern
|
if nval_cave > TCAVE then -- Cavern
|
||||||
|
|
|
@ -570,12 +570,14 @@ local function register_dimension_biomes()
|
||||||
--[[ THE END ]]
|
--[[ THE END ]]
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "end",
|
name = "end",
|
||||||
|
node_stone = "air",
|
||||||
node_filler = "mcl_end:end_stone",
|
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.
|
-- FIXME: For some reason the End stops generating early if this constant is not added.
|
||||||
-- Figure out why.
|
-- Figure out why.
|
||||||
y_min = mcl_vars.mg_end_min,
|
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,
|
heat_point = 50,
|
||||||
humidity_point = 50,
|
humidity_point = 50,
|
||||||
})
|
})
|
||||||
|
@ -609,7 +611,7 @@ local function register_biomelike_ores()
|
||||||
|
|
||||||
--mcl_core STRATA
|
--mcl_core STRATA
|
||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "sheet",
|
ore_type = "blob",
|
||||||
ore = "mcl_core:stone",
|
ore = "mcl_core:stone",
|
||||||
wherein = {"mcl_colorblocks:hardened_clay_orange"},
|
wherein = {"mcl_colorblocks:hardened_clay_orange"},
|
||||||
clust_scarcity = 1,
|
clust_scarcity = 1,
|
||||||
|
@ -996,44 +998,46 @@ local function register_dimension_ores()
|
||||||
--[[ THE END ]]
|
--[[ THE END ]]
|
||||||
|
|
||||||
-- Generate fake 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({
|
minetest.register_ore({
|
||||||
ore_type = "blob",
|
ore_type = "sheet",
|
||||||
ore = "mcl_end:end_stone",
|
ore = "mcl_end:end_stone",
|
||||||
wherein = {"air", "mcl_core:stone"},
|
wherein = {"air"},
|
||||||
clust_scarcity = 30 * 30 * 30,
|
y_min = mcl_vars.mg_end_min+64,
|
||||||
clust_size = 17,
|
y_max = mcl_vars.mg_end_min+94,
|
||||||
y_min = mcl_vars.mg_end_min,
|
column_height_min = 6,
|
||||||
y_max = mcl_vars.mg_end_max,
|
column_height_max = 7,
|
||||||
noise_threshold = 0.0,
|
column_midpoint_factor = 0.0,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.5,
|
offset = -2,
|
||||||
scale = 0.1,
|
scale = 8,
|
||||||
spread = {x = 5, y = 5, z = 5},
|
spread = {x=100, y=100, z=100},
|
||||||
seed = 16,
|
seed = 2999,
|
||||||
octaves = 1,
|
octaves = 5,
|
||||||
persist = 0.0
|
persist = 0.55,
|
||||||
},
|
},
|
||||||
|
noise_threshold = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "scatter",
|
ore_type = "sheet",
|
||||||
ore = "mcl_end:end_stone",
|
ore = "mcl_end:end_stone",
|
||||||
wherein = {"air", "mcl_core:stone"},
|
wherein = {"air"},
|
||||||
clust_scarcity = 30 * 30 * 30,
|
y_min = mcl_vars.mg_end_min+64,
|
||||||
clust_size = 34,
|
y_max = mcl_vars.mg_end_min+94,
|
||||||
y_min = mcl_vars.mg_end_min,
|
column_height_min = 4,
|
||||||
y_max = mcl_vars.mg_end_max,
|
column_height_max = 4,
|
||||||
noise_threshold = 0.0,
|
column_midpoint_factor = 0.0,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.5,
|
offset = -4,
|
||||||
scale = 0.1,
|
scale = 3,
|
||||||
spread = {x = 70, y = 15, z = 70},
|
spread = {x=200, y=200, z=200},
|
||||||
seed = 16,
|
seed = 5390,
|
||||||
octaves = 1,
|
octaves = 5,
|
||||||
persist = 0.0
|
persist = 0.6,
|
||||||
},
|
},
|
||||||
|
noise_threshold = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
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
|
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
|
data[p_pos] = c_realm_barrier
|
||||||
lvm_used = true
|
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
|
elseif mg_name == "v6" then
|
||||||
if y <= mcl_vars.mg_nether_max and y >= mcl_vars.mg_nether_min then
|
if y <= mcl_vars.mg_nether_max and y >= mcl_vars.mg_nether_min then
|
||||||
if data[p_pos] == c_stone 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
|
data[p_pos] = c_soul_sand
|
||||||
lvm_used = true
|
lvm_used = true
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue