Rewrite chicken handler for a new shittier world where inventory indicies aren't a thing ig

This commit is contained in:
Salt 2023-12-01 12:11:24 -06:00
parent 294713ce56
commit 8129f039cd

View File

@ -3,16 +3,22 @@
function placeBreeder()
print('Initializing breeder...')
breeder = peripheral.wrap('top')
-- Why are we discarding slot 2?
-- Because, by design, it MUST be
-- the trash chicken from the last
-- generation.
breeder.pushItems('bottom', 2)
for i = 1, 16, 1 do
turtle.select(i)
turtle.suckUp()
end
-- First, we nab the new chicken in slot 1
turtle.select(1)
turtle.suckUp()
-- Then, we destroy the breeder
turtle.select(2)
turtle.digUp()
-- We are now in a position where we have:
-- 1: Good chicken
-- 2: Inferior chicken
-- 3: Seeds/second inferior chicken
-- 4: Breeder/seeds
-- 5: Null/breeder
-- In any case, discarding 1 item in slot 2 will eliminate poor genes
--turtle.select(2) -- Unnecessary due to previous instr
turtle.dropDown(1)
-- Now we re set-up the breeder
selectItem('chickens:breeder')
turtle.placeUp()
selectItem('minecraft:wheat_seeds')