Compare commits

..

3 Commits

View File

@ -1,20 +1,24 @@
-- See README for usage info -- See README for usage info
-- https://git.desu.ltd/salt/mc-scripts/src/branch/master/stoneblock-3-chicken-breeder/README.md -- https://git.desu.ltd/salt/mc-scripts/src/branch/master/stoneblock-3-chicken-breeder/README.md
-- Breaks and replaces the breeder on top of the turtle
-- This is called after every generation
function placeBreeder() function placeBreeder()
print('Initializing breeder...') print('Initializing breeder...')
breeder = peripheral.wrap('top') breeder = peripheral.wrap('top')
-- This ensures that we have the new generation chicken in slot 1 -- First, we nab the new chicken in slot 1
turtle.select(1) turtle.select(1)
turtle.suckUp() turtle.suckUp()
-- Then we select the next slot and bop the breeder -- Then, we destroy the breeder
turtle.select(2) turtle.select(2)
turtle.digUp() turtle.digUp()
-- Why are we discarding slot 2? Because, by design, it MUST be the trash -- We are now in a position where we have:
-- chicken from the last generation. -- 1: Good chicken
breeder.pushItems('bottom', 2) -- 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') selectItem('chickens:breeder')
turtle.placeUp() turtle.placeUp()
selectItem('minecraft:wheat_seeds') selectItem('minecraft:wheat_seeds')