diff options
author | cheapie <no-email-for-you@example.com> | 2015-12-14 18:46:42 -0600 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2015-12-14 18:46:42 -0600 |
commit | f90001680135a4b6092a309d4227d4a18512e0bc (patch) | |
tree | ca31aac7c1a933a0ec1d66676855e7225dc26b85 | |
download | flatperiod-f90001680135a4b6092a309d4227d4a18512e0bc.tar flatperiod-f90001680135a4b6092a309d4227d4a18512e0bc.tar.gz flatperiod-f90001680135a4b6092a309d4227d4a18512e0bc.tar.bz2 flatperiod-f90001680135a4b6092a309d4227d4a18512e0bc.tar.xz flatperiod-f90001680135a4b6092a309d4227d4a18512e0bc.zip |
Add stuff
-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) |