2018-07-18 23:22:18 +02:00
|
|
|
mmgen_simple = {}
|
|
|
|
|
2018-07-28 20:45:53 +02:00
|
|
|
function mmgen_simple.generate(current_layer, vm, area, vm_data, minp, maxp, offset_minp, offset_maxp, params)
|
|
|
|
|
2022-03-24 22:01:05 +01:00
|
|
|
local nodetype = "mcl_core:stone"
|
2018-08-03 12:28:11 +02:00
|
|
|
local height = 0
|
2018-07-28 20:45:53 +02:00
|
|
|
|
2018-08-03 12:28:11 +02:00
|
|
|
if params and type(params) == "table" then
|
|
|
|
if params.nodetype then nodetype = params.nodetype end
|
|
|
|
if params.height then height = params.height end
|
2018-07-19 00:11:59 +02:00
|
|
|
end
|
|
|
|
|
2018-08-03 12:28:11 +02:00
|
|
|
local c_ground = multi_map.node[nodetype]
|
|
|
|
|
2018-07-28 20:45:53 +02:00
|
|
|
if offset_minp.y >= height then
|
2018-07-22 18:37:38 +02:00
|
|
|
multi_map.generate_singlenode_chunk(minp, maxp, area, vm_data, multi_map.node["air"])
|
2018-07-17 22:59:58 +02:00
|
|
|
else
|
2018-07-19 00:11:59 +02:00
|
|
|
multi_map.generate_singlenode_chunk(minp, maxp, area, vm_data, c_ground)
|
2018-07-17 21:16:37 +02:00
|
|
|
end
|
2018-07-19 00:11:59 +02:00
|
|
|
|
2018-07-17 21:16:37 +02:00
|
|
|
end
|