Compare commits

...

3 Commits

View File

@ -1,20 +1,24 @@
-- See README for usage info
-- 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()
print('Initializing breeder...')
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.suckUp()
-- Then we select the next slot and bop the breeder
-- Then, we destroy the breeder
turtle.select(2)
turtle.digUp()
-- Why are we discarding slot 2? Because, by design, it MUST be the trash
-- chicken from the last generation.
breeder.pushItems('bottom', 2)
-- 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')