-- download at MT.QZX.COM (item-selector.lua) local i = "a" -- input pulse to inject item local t = "b" -- input pulse to change selected item local c1 = "dep" -- digiline injector channel when deploying local c2 = "sel" -- digiline injector channel when changing selected item local u = "default:goldblock" -- item to display when cycling through types local items = { {"default:sapling", "apple"}, -- default:acacia_sapling -- floating logs {"default:aspen_sapling", "aspen"}, {"default:junglesapling", "jungle"}, {"default:pine_sapling", "pine"}, -- ethereal:bamboo_sprout -- average sprout drop is too low -- ethereal:banana_tree_sapling -- floating logs -- ethereal:big_tree_sapling -- drops default:sapling {"ethereal:birch_sapling", "birch"}, {"ethereal:frost_tree_sapling", "frost"}, {"ethereal:orange_tree_sapling", "orange"}, -- ethereal:palm_sapling -- floating logs -- ethereal:redwood_sapling -- destroys dirt block and machines -- {"ethereal:sakura_sapling", "sakura"}, {"ethereal:willow_sapling", "willow"}, {"ethereal:yellow_tree_sapling", "healing"}, {"moretrees:rubber_tree_sapling", "rubber"}, -- illuna_ethereal:douglasie_sapling -- destroys dirt block -- illuna_ethereal:fierytree_sapling -- destroys dirt block and machines -- illuna_ethereal:iska_birch1_sapling -- destroys dirt block -- illuna_ethereal:iska_birch2_sapling -- destroys dirt block } function lcd_all() digiline_send("lcd", "\nALL\n---next---\n"..items[mem.n][2]) end if event.type == "program" then mem.t = 0 -- random/sequential mem.n = 1 -- next sequential type digiline_send(c2, u.." 1") lcd_all() elseif event.type == "on" and pin[t] then -- update display mem.t = mem.t + 1 if mem.t > #items then mem.t = 0 end if mem.t == 0 then digiline_send(c2, u.." 1") lcd_all() else digiline_send(c2, items[mem.t][1].." 1") digiline_send("lcd", "\n----"..mem.t.."----\n"..items[mem.t][2]) end elseif event.type == "on" and pin[i] then if mem.t > 0 then digiline_send(c1, items[mem.t][1].." 1") else digiline_send(c1, items[mem.n][1].." 1") mem.n = mem.n + 1 if mem.n > #items then mem.n = 1 end lcd_all() -- digiline_send(c1, items[math.random(1, #items)][1].." 1") end end