Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --config
- local presserName = 'minecraft:pampresser_0'
- local presser2Name = 'minecraft:pampresser_1'
- local outputName = 'minecraft:chest_0'
- local networkName = 'turtle_0'
- --
- local hives = {peripheral.find('minecraft:pamapiary')}
- local presser = peripheral.wrap(presserName)
- local presser2 = peripheral.wrap(presser2Name)
- local output = peripheral.wrap(outputName)
- if not presser then
- error('Presser not found!')
- end
- if not presser2 then
- error('Second presser not found!')
- end
- if not output then
- error('Output not found!')
- end
- if #hives == 0 then
- error('No hives detected!')
- end
- local function collection()
- while true do
- sleep(0.05)
- for i,hive in ipairs(hives) do
- for num = 1,18 do
- local meta = hive.getItemMeta(num)
- if meta and meta.rawName == 'item.queenbeeitem' then
- hive.pushItems(networkName,1)
- hive.pullItems(networkName,1,1,19)
- elseif meta and meta.rawName == 'item.grubitem' then
- hive.pushItems(outputName,num)
- elseif meta then
- if meta.rawName == 'item.honeycombitem' then
- hive.pushItems(presserName,num,1,1)
- else
- hive.pushItems(presser2Name,num,1,1)
- end
- end
- end
- end
- for num = 2,3 do
- presser.pushItems(outputName,num)
- presser2.pushItems(outputName,num)
- end
- end
- end
- collection()
Add Comment
Please, Sign In to add comment