From f90001680135a4b6092a309d4227d4a18512e0bc Mon Sep 17 00:00:00 2001 From: cheapie Date: Mon, 14 Dec 2015 18:46:42 -0600 Subject: Add stuff --- README | 1 + depends.txt | 1 + init.lua | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 README create mode 100644 depends.txt create mode 100644 init.lua diff --git a/README b/README new file mode 100644 index 0000000..37f3d1c --- /dev/null +++ b/README @@ -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) -- cgit v1.2.3