Advertisement
untitledgese

Untitled

Jan 28th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. command crophopper:
  2. permission: admin.ch
  3. trigger:
  4. give player hopper named "&9Crop Hopper" with lore "This hopper puts one entire slot of items into the container every 5 seconds!"
  5. on place:
  6. if player's tool is hopper named "&9Crop Hopper" with lore "This hopper puts one entire slot of items into the container every 5 seconds!":
  7. set {_hdirection} to event-block named "&9Crop Hopper"
  8. set event-block to {_hdirection}
  9. add {_hdirection} to {crophop::*}
  10. every 5 seconds:
  11. loop {crophop::*}:
  12. set {hopper} to loop-value
  13. if slot 0 of loop-value is air:
  14. if slot 1 of loop-value is air:
  15. if slot 2 of loop-value is air:
  16. if slot 3 of loop-value is air:
  17. if slot 4 of loop-value is air:
  18. stop loop
  19. else:
  20. loop all blocks in radius 1 around loop-value:
  21. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  22. if {hopper} is facing of loop-block:
  23. add slot 4 of {hopper} to loop-block
  24. set slot 4 of {hopper} to air
  25. stop loop
  26. else:
  27. loop all blocks in radius 1 around loop-value:
  28. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  29. if {hopper} is facing of loop-block:
  30. add slot 3 of {hopper} to loop-block
  31. set slot 3 of {hopper} to air
  32. stop loop
  33. else:
  34. loop all blocks in radius 1 around loop-value:
  35. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  36. if {hopper} is facing of loop-block:
  37. add slot 2 of {hopper} to loop-block
  38. set slot 2 of {hopper} to air
  39. stop loop
  40. else:
  41. loop all blocks in radius 1 around loop-value:
  42. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  43. if {hopper} is facing of loop-block:
  44. add slot 1 of {hopper} to loop-block
  45. set slot 1 of {hopper} to air
  46. stop loop
  47. else:
  48. loop all blocks in radius 1 around loop-value:
  49. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  50. if {hopper} is facing of loop-block:
  51. add slot 0 of {hopper} to loop-block
  52. set slot 0 of {hopper} to air
  53. stop loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement