Compare commits

..

3 Commits

Author SHA1 Message Date
8129f039cd Rewrite chicken handler for a new shittier world where inventory indicies aren't a thing ig 2023-12-01 12:11:24 -06:00
294713ce56 Revert "Testing"
This reverts commit 445602b60dc7fa7ccc21fcde6fdabd028a4480cb.
2023-12-01 12:03:18 -06:00
53fe827e4d Revert "Testing alternative chicken acquisition methods"
This reverts commit 5fcd59806752582a6f451abb69f1ff531eb7577a.
2023-12-01 12:03:13 -06:00

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')