Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w, h=term.getSize()
- term.clear()
- term.setCursorPos(1,1)
- print("Initializing blocks...")
- block.addBlock("Air"," ",colors.lightBlue,colors.lightBlue)
- block.addBlock("Grass"," ",colors.green,colors.green)
- block.addBlock("Dirt"," ",colors.brown,colors.brown)
- print("Block initialization done!")
- print("Preparing to generate world...")
- biomeMaxY=7
- biomeMinY=5
- term.clear()
- term.setCursorPos(1,1)
- for i=1,w do
- height=math.random(biomeMinY,biomeMaxY)
- curH=h
- for z=1,height do
- term.setCursorPos(i,curH)
- if height >= 1 then
- block.renderBlock("Dirt",i,curH)
- curH=curH-1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement