Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local width, height = ...
- b_def = "minecraft:planks"
- b_win = "minecraft:glass_pane"
- b_spc = "minecraft:log"
- function take(name)
- while true do
- item = turtle.getItemDetail()
- if item then
- if item.name == name then
- return true
- end
- end
- slot = turtle.getSelectedSlot() + 1
- if slot > 16 then slot = 0 end
- turtle.select(slot)
- end
- end
- function select_material()
- take(b_def)
- end
- function build_layer(width)
- turtle.up()
- for i = 1, 4 do
- for i = 0, width - 1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- end
- end
- function build_rectangle(width, height)
- for i = 1, height do
- build_layer(width)
- end
- end
- turtle.refuel()
- build_rectangle(width, height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement