Created
February 21, 2016 15:44
-
-
Save Matthewacon/9f2fbcf389a401f3bb60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Chunk = require('prismarine-chunk')(require("../version")); | |
const Vec3 = require('vec3').Vec3; | |
function generation() { | |
function generateSimpleChunk(dx,dy,dz) { | |
const chunk = new Chunk(); | |
for (let x = (dy*16)-16; x < (dx*16); x++) { | |
for (let z = (dz*16)-16; z < (dz*16); z++) { | |
chunk.setBlockType(new Vec3(x, 50, z), 2); | |
for (let y = (dy*16)-16; y < 256; y++) { | |
chunk.setSkyLight(new Vec3(x, y, z), 15); | |
} | |
} | |
} | |
return chunk; | |
} | |
return generateSimpleChunk; | |
} | |
module.exports=generation; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment