Paste: crystal

Author: FF
Mode: factor
Date: Mon, 29 Jul 2019 17:45:14
Plain Text |
while true do
    c = peripheral.wrap("back")
    o = peripheral.wrap("minecraft:ironchest_crystal_0")
    if table.getn(o.list()) < 100 then
        while true do
            if redstone.getInput("top") == true then
                break
            end
            os.sleep(1)
        end
        c.suck(1,1)
        c.suck(2,1)
        if table.getn(c.list()) > 1 then
            p1 = c.getItemMeta(1)
            p2 = c.getItemMeta(2)
            if p1.crystalProperties.size > p2.crystalProperties.size then
                c.drop(2,1,"south")
                c.pushItems("north",1,1)
            else
                c.drop(1,1,"south")
                c.pushItems("north",2,1)
            end
        else
            c.drop(1,1,"south")
        end
        redstone.setOutput("right",true)
        while true do
            if redstone.getInput("top") == false then
                break
            end
            os.sleep(1)
        end
        redstone.setOutput("right",false)
    end
        
    
    
    
    
    
    end

New Annotation

Summary:
Author:
Mode:
Body: