Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Simple little program to automate my Minecraft emerald farm.
- ---
- ---Basic idea: I have an infinite villager breeder feeding into a
- ---smeltery (yes, I'm a bad, bad man). This script is for the computer
- ---to monitor the smeltery and trigger the drain whenever there's more than
- ---one emerald in there. More than one so that the smeltery doesn't end up
- ---empty and stop killing villagers.
- function alarm()
- allGood=false
- redstone.setOutput("bottom",true)
- while not allGood do
- info=smelt.getInfo()
- allGood= (info.id==27)
- end
- redstone.setOutput("bottom",false)
- end
- smelt=peripheral.wrap("right")
- alarm()
- while true do
- info=smelt.getInfo()
- print(info.id)
- if not (info.id==27) then
- alarm()
- elseif info.amount > 640 then
- redstone.setOutput("back",true)
- sleep(1)
- redstone.setOutput("back",false)
- end
- sleep(30)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement