Advertisement
WorldTeacher

farm

Jun 8th, 2022
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. --This is a program for a minecraft mobfarm using the mob duplicator and a turtle
  2. os.loadAPI("BryButtonAPI")
  3.  
  4. monitor = peripheral.find("monitor")
  5. monitor.setTextScale(1)
  6. monitor.setBackgroundColor(colors.black)
  7. --Define the colors used in the program
  8.  
  9. black = colors.black
  10. white = colors.white
  11. red = colors.red
  12. green = colors.green
  13.  
  14. --Define the functions used in the program
  15.  
  16.  
  17. function Enderfarm(state)
  18.  
  19. if state then
  20. rs.setOutput("left", true)
  21. else
  22. rs.setOutput("left", false)
  23. end
  24. end
  25.  
  26. function Blazefarm(state)
  27.  
  28. if state then
  29. rs.setOutput("right", true)
  30. else
  31. rs.setOutput("right", false)
  32. end
  33. end
  34.  
  35. function Witherfarm(state)
  36.  
  37. if state then
  38. rs.setOutput("back", true)
  39. else
  40. rs.setOutput("back", false)
  41. end
  42. end
  43. --Define the buttons used in the program
  44.  
  45. Mobfarm1 = BryButtonAPI.createNewButton(2,2,"Enderman",red, green, true, Enderfarm)
  46. Mobfarm2 = BryButtonAPI.createNewButton(2,6,"Blaze",red, green, true, Blazefarm)
  47. Mobfarm3 = BryButtonAPI.createNewButton(2,10,"Wither Skeleton",red, green, true, Witherfarm)
  48. --Make ButtonList
  49. list={Mobfarm1,Mobfarm2,Mobfarm3}
  50. --Draw Buttons on the screen
  51. BryButtonAPI.drawButtons(monitor,list)
  52. while true do
  53. BryButtonAPI.checkButtonsPressed(monitor,list, 0, print)
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement