Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Slot_Count = 16
- local width, depth, height = 10, 10, 2
- DROPPED_ITEMS = {
- "minecraft:stone",
- "minecraft:dirt",
- "minecraft:cobblestone",
- "minecraft:sand",
- "minecraft:gravel",
- "minecraft:flint",
- "minecraft:dye",
- "forestry:apatite"
- }
- function Drop_Items()
- print("Droping trash...")
- for SlotNum = 1, Slot_Count, 1 do
- local Item = turtle.getItemDetail(SlotNum)
- if(Item ~= nil) then
- for FilterIndex = 1, #DROPPED_ITEMS, 1 do
- if(Item["name"] == DROPPED_ITEMS[FilterIndex]) then
- print("Droppign - " .. Item["name"])
- turtle.select(SlotNum)
- turtle.dropDown()
- end
- end
- end
- end
- end
- function GetEnderIndex()
- for SlotNum = 1, Slot_Count, 1 do
- local Item = turtle.getItemDetail(SlotNum)
- if(Item ~=nil) then
- if(Item["name"] == "enderstorage:ender_storage") then
- return SlotNum
- end
- end
- end
- end
- function manageInventory()
- Index = GetEnderIndex()
- if(Index ~= nil) then
- turtle.select(Index)
- turtle.digUp()
- turtle.placeUp()
- end
- -- ender chest deployed
- for SlotNum = 1, Slot_Count, 1 do
- local Item = turtle.getItemDetail(SlotNum)
- if(Item ~=nil) then
- if(Item["name"] ~= "minecraft:coal_block" and Item["name"] ~= "minecraft:coal") then
- turtle.select(SlotNum)
- turtle.dropUp()
- end
- end
- end
- -- Items are stored
- turtle.digUp()
- end
- manageInventory()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement