forked from MineClone5/MineClone5
Disable debugging tools
This commit is contained in:
parent
0e70e386ea
commit
6eb126da40
|
@ -146,7 +146,6 @@ mcl_structures.register_structure({
|
||||||
on_finished_chunk = function(minp, maxp, seed, vm_context, pos_list)
|
on_finished_chunk = function(minp, maxp, seed, vm_context, pos_list)
|
||||||
local a = seed % 14
|
local a = seed % 14
|
||||||
local b = (math.floor(seed / 39) + 4) % 12
|
local b = (math.floor(seed / 39) + 4) % 12
|
||||||
minetest.chat_send_all("seed=" .. tostring(seed) .. ", a=" .. tostring(a) .. ", b=" ..tostring(b))
|
|
||||||
if a ~= b then return end
|
if a ~= b then return end
|
||||||
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
||||||
local current_noise_level = mcl_structures.perlin_noise:get_3d(minp)
|
local current_noise_level = mcl_structures.perlin_noise:get_3d(minp)
|
||||||
|
|
|
@ -72,7 +72,7 @@ function mcl_structures.register_structure(def)
|
||||||
local decoration_id
|
local decoration_id
|
||||||
if decoration then
|
if decoration then
|
||||||
minetest.register_node(':' .. name, {
|
minetest.register_node(':' .. name, {
|
||||||
-- drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
|
|
@ -158,7 +158,6 @@ mcl_structures.register_structure({
|
||||||
on_finished_chunk = function(minp, maxp, seed, vm_context, pos_list)
|
on_finished_chunk = function(minp, maxp, seed, vm_context, pos_list)
|
||||||
local a = seed % 17
|
local a = seed % 17
|
||||||
local b = (math.ceil(seed / 123) - 4) % 17
|
local b = (math.ceil(seed / 123) - 4) % 17
|
||||||
minetest.chat_send_all("seed=" .. tostring(seed) .. ", a=" .. tostring(a) .. ", b=" ..tostring(b))
|
|
||||||
if a ~= b then return end
|
if a ~= b then return end
|
||||||
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
||||||
local current_noise_level = mcl_structures.perlin_noise:get_3d(maxp)
|
local current_noise_level = mcl_structures.perlin_noise:get_3d(maxp)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
local step = 1
|
||||||
|
local chunk_borders = true
|
||||||
|
|
||||||
local levels = {
|
local levels = {
|
||||||
[-9] = "black",
|
[-9] = "black",
|
||||||
[-8] = "brown",
|
[-8] = "brown",
|
||||||
|
@ -27,8 +30,8 @@ mcl_mapgen.register_mapgen(function(minp, maxp, seed, vm_context)
|
||||||
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
mcl_structures.perlin_noise = mcl_structures.perlin_noise or minetest.get_perlin(329, 3, 0.6, 100)
|
||||||
local perlin_noise = mcl_structures.perlin_noise
|
local perlin_noise = mcl_structures.perlin_noise
|
||||||
local y0 = minp.y
|
local y0 = minp.y
|
||||||
for x0 = minp.x, maxp.x do
|
for x0 = minp.x, maxp.x, step do
|
||||||
for z0 = minp.z, maxp.z do
|
for z0 = minp.z, maxp.z, step do
|
||||||
local current_noise_level = perlin_noise:get_3d({x=x0, y=y0, z=z0})
|
local current_noise_level = perlin_noise:get_3d({x=x0, y=y0, z=z0})
|
||||||
local amount
|
local amount
|
||||||
if current_noise_level < 0 then
|
if current_noise_level < 0 then
|
||||||
|
@ -40,4 +43,16 @@ mcl_mapgen.register_mapgen(function(minp, maxp, seed, vm_context)
|
||||||
minetest.set_node({x=x0, y=y0, z=z0}, {name = "mcl_core:glass_"..levels[amount]})
|
minetest.set_node({x=x0, y=y0, z=z0}, {name = "mcl_core:glass_"..levels[amount]})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if chunk_borders then
|
||||||
|
for x0 = minp.x, maxp.x, step do
|
||||||
|
for y0 = minp.y, maxp.y, step do
|
||||||
|
minetest.set_node({x=x0, y=y0, z=maxp.z}, {name = "mcl_core:glass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for z0 = minp.z, maxp.z, step do
|
||||||
|
for y0 = minp.y, maxp.y, step do
|
||||||
|
minetest.set_node({x=maxp.x, y=y0, z=z0}, {name = "mcl_core:glass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end, -1)
|
end, -1)
|
||||||
|
|
|
@ -6,5 +6,5 @@ if not mcl_mapgen.singlenode then
|
||||||
dofile(modpath .. "/jungle_temple.lua")
|
dofile(modpath .. "/jungle_temple.lua")
|
||||||
dofile(modpath .. "/stronghold.lua")
|
dofile(modpath .. "/stronghold.lua")
|
||||||
|
|
||||||
dofile(modpath .. "/noise_indicator.lua")
|
-- dofile(modpath .. "/noise_indicator.lua")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue