Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = turtle
- local i = 0
- local q = 0
- local a = true
- local SLOT_COUNT = 16
- DROPPED_ITEMS = {
- "minecraft:barrel"
- }
- function placeBarrel()
- print("Purging Inventory...")
- for slot = 1, SLOT_COUNT, 1 do
- local item = t.getItemDetail(slot)
- if(item ~= nil) then
- for filterIndex = 1, #DROPPED_ITEMS, 1 do
- if(item["name"] == DROPPED_ITEMS[filterIndex]) then
- print("Dropping - " .. item["name"])
- t.select(slot)
- t.place()
- end
- end
- end
- end
- end
- function findBarrel()
- print('succing')
- t.suck()
- end
- while true do
- findBarrel()
- placeBarrel()
- t.turnLeft()
- t.forward()
- t.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement