View difference between Paste ID: sEhkivhG and RSgKyrXv
SHOW: | | - or go back to the newest paste.
1
-- Basic computer, chest to right, second chest below that.
2
-- load top chest with witherheads and soul sand
3
-- import bus on second chest will import 4 sand and 3 heads every ~3
4
-- seconds, the ae update will trigger formation planes to place
5
-- wither parts and construct a wither.
6
-- Note: it's assumed this is at the top of a wither killing
7
-- structure (using draconic grinder or equivalent)
8
9
chest = peripheral.wrap("right")
10
chest.condenseItems()
11
12
local ok=2
13
14
while ok==2 do
15
ok=0
16
17
for i=1,27 do
18
  if chest.getStackInSlot(i)~=nil and ok==0 then
19
    local slot = chest.getStackInSlot(i)
20
    print(slot.name.." is in slot "..i)
21
    if slot.name=="soul_sand" then
22
      print("Pushing soul sand down from "..i)
23
      chest.pushItem("down",i,4)
24
      ok=1
25
    end
26
--  else
27
--    print ("slot "..i.." is empty.")
28
  end
29
end
30
31
sleep(1)
32
33
for i=1,27 do
34
  if chest.getStackInSlot(i)~=nil and ok==1 then
35
    local slot = chest.getStackInSlot(i)
36
    print(slot.name.." is in slot "..i)
37
    if slot.name=="skull" then
38
      print("Pushing skull down from "..i)
39
      chest.pushItem("down",i,3)
40
      ok=2
41
    end
42
  end
43
end
44
45
sleep(3)
46
end