Advertisement
KaktusCZ

Untitled

Feb 16th, 2019
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local width, height = ...
  2.  
  3. b_def = "minecraft:stone"
  4. b_win = "minecraft:glass_pane"
  5. b_spc = "minecraft:log"
  6.  
  7. function take(name)
  8. while true do
  9. item = turtle.getItemDetail()
  10. if item then
  11. if item.name == name then
  12. return true
  13. end
  14. end
  15. slot = turtle.getSelectedSlot() + 1
  16. if slot > 16 then slot = 1 end
  17. turtle.select(slot)
  18. end
  19. end
  20.  
  21. function select_material(index, edge)
  22. take(b_def)
  23. end
  24.  
  25. function build_layer(width)
  26. turtle.up()
  27. for i = 1, 4 do
  28. for i = 1, width do
  29. select_material(i, w)
  30. turtle.placeDown()
  31. turtle.forward()
  32. end
  33. turtle.turnRight()
  34. end
  35. end
  36.  
  37. function build_rectangle(width, height)
  38. for i = 1, height do
  39. build_layer(width)
  40. end
  41. end
  42.  
  43. turtle.refuel()
  44. build_rectangle(width, height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement