Advertisement
justync7

mcengine

Jun 5th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. w, h=term.getSize()
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. print("Initializing blocks...")
  5. block.addBlock("Air"," ",colors.lightBlue,colors.lightBlue)
  6. block.addBlock("Grass"," ",colors.green,colors.green)
  7. block.addBlock("Dirt"," ",colors.brown,colors.brown)
  8. print("Block initialization done!")
  9. print("Preparing to generate world...")
  10. biomeMaxY=7
  11. biomeMinY=5
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. for i=1,w do
  15. height=math.random(biomeMinY,biomeMaxY)
  16. curH=h
  17. for z=1,height do
  18. term.setCursorPos(i,curH)
  19. if height >= 1 then
  20. block.renderBlock("Dirt",i,curH)
  21. curH=curH-1
  22. end
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement