diff options
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 20 |
3 files changed, 22 insertions, 0 deletions
@@ -0,0 +1 @@ +Flat map. All stone. That's it. diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..2b45711 --- /dev/null +++ b/init.lua @@ -0,0 +1,20 @@ +core.register_on_generated(function(minp, maxp, blockseed) + local c_node = core.get_content_id("default:stone") + local miny = minp.y + if miny > 0 then return end + local minx, minz, maxx, maxy, maxz = minp.x, minp.z, maxp.x, maxp.y, maxp.z + local vm, emin, emax = core.get_mapgen_object("voxelmanip") + local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} + local data = vm:get_data() + for index in area:iter(minx, miny, minz, maxx, maxy, maxz) do + data[index] = c_node + 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) |