Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pressersP = {peripheral.find('minecraft:pampresser')}
- local honeyPressers = {
- }
- local waxPressers = {
- }
- for i,v in pairs(pressersP) do
- if i%2 ~= 0 then
- table.insert(honeyPressers,peripheral.getName(v))
- else
- table.insert(waxPressers,peripheral.getName(v))
- end
- end
- local apiaries = {peripheral.find('minecraft:pamapiary')}
- local trashChest = 'minecraft:dispenser_0'
- local trashChestP = peripheral.wrap(trashChest)
- local waxOutput = 'minecraft:ironchest_diamond_0'
- local honeyOutput = 'minecraft:ironchest_diamond_1'
- local waxOutputP = peripheral.wrap(waxOutput)
- local honeyOutputP = peripheral.wrap(honeyOutput)
- --begin load
- for i,v in pairs(apiaries) do
- sleep()
- print('Checking apiary '..i..'/'..#apiaries)
- for ii,vv in pairs(v.list()) do
- if vv.name == 'harvestcraft:honeycombitem' then
- for iii,vvv in pairs(honeyPressers) do
- v.pushItems(vvv,ii,math.ceil(vv.count/#honeyPressers),1)
- end
- elseif vv.name == 'harvestcraft:waxcombitem' then
- for iii,vvv in pairs(waxPressers) do
- v.pushItems(vvv,ii,math.ceil(vv.count/#waxPressers),1)
- end
- elseif vv.name == 'harvestcraft:queenbeeitem' then
- v.pushItems('self',ii,1,19)
- else
- v.pushItems(trashChest,ii,64)
- end
- end
- if i%math.floor(#apiaries/10) == 0 then
- for i,v in pairs(honeyPressers) do
- print('Emptying honey presser '..i..'/'..#honeyPressers)
- sleep()
- local tempP = peripheral.wrap(v)
- for ii,vv in pairs(tempP.list()) do
- if vv.name == 'harvestcraft:beeswaxitem' then
- waxOutputP.pullItems(v,ii,64)
- trashChestP.pullItems(v,ii,64)
- elseif vv.name == 'harvestcraft:honeyitem' then
- honeyOutputP.pullItems(v,ii,64)
- trashChestP.pullItems(v,ii,64)
- end
- end
- end
- print('Emptying Trash Chest...')
- for ii,vv in pairs(trashChestP.list()) do
- trashChestP.drop(ii)
- end
- for i,v in pairs(waxPressers) do
- print('Emptying wax presser '..i..'/'..#waxPressers)
- sleep()
- local tempP = peripheral.wrap(v)
- for ii,vv in pairs(tempP.list()) do
- if vv.name == 'harvestcraft:beeswaxitem' then
- waxOutputP.pullItems(v,ii,64)
- trashChestP.pullItems(v,ii,64)
- end
- end
- end
- end
- end
- --end load
Advertisement
Add Comment
Please, Sign In to add comment