Advertisement
UntitledGoose

Untitled

Jan 28th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 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 of hopper:
  6. if player's tool is hopper named "&9Crop Hopper":
  7. set event-block to {_hdirection}
  8. set event-block to {_hdirection} named "&9Crop Hopper"
  9. add event-block 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. continue
  15. else:
  16. loop all blocks in radius 1 around loop-value:
  17. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  18. if {hopper} is facing of loop-block:
  19. add slot 0 of {hopper} to loop-block
  20. set slot 0 of {hopper} to air
  21. if slot 1 of loop-value is air:
  22. continue
  23. else:
  24. loop all blocks in radius 1 around loop-value:
  25. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  26. if {hopper} is facing of loop-block:
  27. add slot 1 of {hopper} to loop-block
  28. set slot 1 of {hopper} to air
  29. if slot 2 of loop-value is air:
  30. continue
  31. else:
  32. loop all blocks in radius 1 around loop-value:
  33. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  34. if {hopper} is facing of loop-block:
  35. add slot 2 of {hopper} to loop-block
  36. set slot 2 of {hopper} to air
  37. if slot 3 of loop-value is air:
  38. continue
  39. else:
  40. loop all blocks in radius 1 around loop-value:
  41. if loop-block is chest, hopper or hopper named "&9Crop Hopper":
  42. if {hopper} is facing of loop-block:
  43. add slot 3 of {hopper} to loop-block
  44. set slot 3 of {hopper} to air
  45. if slot 4 of loop-value is 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 4 of {hopper} to loop-block
  52. set slot 4 of {hopper} to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement