Computercraft automatic enchantment sorter

01
local chest = peripheral.wrap("front")
02
print("Radcom's Enchantment sorter V1.2")
03
while true do
04
    sleep(1)
05
    for i = 1, chest.getInventorySize() do
06
        local item = chest.getStackInSlot(i)
07
        if item and item.ench then
08
            print("Found a ", item.name, " with an enchantment")
09
            print("Moving")
10
            chest.pushItem("south",i,1)
11
        else
12
            if item then
13
                print("moving: ",item.qty, " ",item.name)
14
                chest.pushItem("east",i,item.qty)
15
            end
16
        end
17
     end
18
end

Leave a Reply

Your email address will not be published. Required fields are marked *