blob: f5d7f1184171130d7a9420f616395ed50bf32401 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
minetest.set_mapgen_params({mgname = "singlenode"})
core.register_on_generated(function(minp, maxp)
if minp.y > 0 then return end
local vm, emin, emax = core.get_mapgen_object("voxelmanip")
local data = vm:get_data()
for index in VoxelArea:new{MinEdge=emin, MaxEdge=emax}:iter(minp.x, minp.y, minp.z, maxp.x, maxp.y, maxp.z) do
data[index] = core.get_content_id("default:stone")
end
vm:set_data(data)
vm:set_lighting({day=5, night=5})
vm:calc_lighting()
vm:write_to_map(data)
end)
core.register_on_newplayer(function(player) player:setpos({x=0,y=50,z=0}) end)
|