From c787fde08aeca26e3a960a3bcbd3378dc88bed00 Mon Sep 17 00:00:00 2001 From: erius0 <63460770+erius0@users.noreply.github.com> Date: Tue, 5 Jan 2021 16:09:20 +0300 Subject: [PATCH] Update craftCrystal.lua --- craftCrystal.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/craftCrystal.lua b/craftCrystal.lua index f662e41..b15a839 100644 --- a/craftCrystal.lua +++ b/craftCrystal.lua @@ -1,2 +1,13 @@ local robot = require("robot") -robot.suck() +local component = require("component") +local sides = require("sides") +local rs = component.redstone +while true do + if rs.getInput(sides.top) > 0 then + robot.suck() + robot.dropDown() + else + robot.suckDown() + robot.drop() + end +end