Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("move")
- os.loadAPI("inv")
- os.loadAPI("build")
- args = {...}
- dirtSlot = 1
- glowstoneSlot = 2
- lilypadSlot = 3
- waterSlot = 4
- dirtChestSlot = 13
- glowstoneChestSlot = 14
- lilypadChestSlot = 15
- bucketChestSlot = 16
- function buildFarm(x, z)
- for i = 1, 9 * x, 1 do
- for j = 1, 9 * z - 1, 1 do
- if (i % 9 == 5 and j % 9 == 5) then
- build.fromSlotDown(waterSlot, bucketChestSlot, true)
- inv.export(waterSlot, bucketChestSlot)
- move.up(1)
- build.fromSlotDown(lilypadSlot, lilypadChestSlot)
- build.fromSlotUp(glowstoneSlot, glowstoneChestSlot)
- move.forward(1)
- move.down(1)
- else
- build.fromSlotDown(dirtSlot, dirtChestSlot)
- if (i % 3 == 2 and j % 3 == 2) then
- move.up(1)
- build.fromSlotUp(glowstoneSlot, glowstoneChestSlot)
- move.down(1)
- end
- move.forward(1)
- end
- end
- build.fromSlotDown(dirtSlot, dirtChestSlot)
- if (i % 2 == 0) then
- move.left(1)
- move.forward(1)
- move.left(1)
- else
- move.right(1)
- move.forward(1)
- move.right(1)
- end
- end
- end
- buildFarm(args[1], args[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement