1
0
Fork 0

Globalize bedrock generation position

This commit is contained in:
Wuzzy 2017-02-20 07:10:03 +01:00
parent 0f2787cd16
commit aa5ef41015
5 changed files with 9 additions and 4 deletions

View File

@ -8,6 +8,9 @@ mcl_vars.gui_bg_img = ""
mcl_vars.inventory_header = mcl_vars.gui_slots .. mcl_vars.gui_bg mcl_vars.inventory_header = mcl_vars.gui_slots .. mcl_vars.gui_bg
mcl_vars.bedrock_overworld_min = -62
mcl_vars.bedrock_overworld_max = -58
-- Set default stack sizes -- Set default stack sizes
minetest.nodedef_default.stack_max = 64 minetest.nodedef_default.stack_max = 64
minetest.craftitemdef_default.stack_max = 64 minetest.craftitemdef_default.stack_max = 64

View File

@ -1,3 +1,4 @@
mcl_init
mcl_core mcl_core
stairs stairs
random_struct random_struct

View File

@ -468,8 +468,8 @@ end)
-- Generate 5 layers of bedrock, with increasing levels of roughness, until a perfecly flat bedrock later at the bottom layer -- Generate 5 layers of bedrock, with increasing levels of roughness, until a perfecly flat bedrock later at the bottom layer
local BEDROCK_MIN = -66 local BEDROCK_MIN = mcl_vars.bedrock_overworld_min
local BEDROCK_MAX = -62 local BEDROCK_MAX = mcl_vars.bedrock_overworld_max
-- Below the bedrock, generate air/void -- Below the bedrock, generate air/void

View File

@ -1,2 +1,3 @@
mcl_init
mcl_core mcl_core
3d_armor? 3d_armor?

View File

@ -116,13 +116,13 @@ minetest.register_globalstep(function(dtime)
end end
-- Apply black sky in the Void and deal Void damage -- Apply black sky in the Void and deal Void damage
if pos.y < -64 then if pos.y < mcl_vars.bedrock_overworld_max then
-- Player reached the void, set black sky box -- Player reached the void, set black sky box
player:set_sky("#000000", "plain") player:set_sky("#000000", "plain")
else else
player:set_sky(nil, "regular") player:set_sky(nil, "regular")
end end
if pos.y < -64 -64 then if pos.y < mcl_vars.bedrock_overworld_min - 65 then
-- Player is deep into the void, deal void damage -- Player is deep into the void, deal void damage
if player:get_hp() > 0 then if player:get_hp() > 0 then
player:set_hp(player:get_hp() - 4) player:set_hp(player:get_hp() - 4)