7mm

breakers

7mm
Feb 23rd, 2019
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. on place:
  2. event-block is redstone block
  3. set {_x} to event-block's x-pos
  4. set {_y} to event-block's y-pos
  5. set {_z} to event-block's z-pos
  6. loop blocks between block at ({_x}+1, {_y}, {_z}) and block at ({_x}+3, {_y}, {_z}):
  7. loop-block is cobblestone
  8. add 1 to {_cnt}
  9. if {_cnt} is 3:
  10. set {_d} to "px"
  11. clear {_cnt}
  12. loop blocks between block at ({_x}-1, {_y}, {_z}) and block at ({_x}-3, {_y}, {_z}):
  13. loop-block is cobblestone
  14. add 1 to {_cnt}
  15. if {_cnt} is 3:
  16. set {_d} to "nx"
  17. clear {_cnt}
  18. loop blocks between block at ({_x}, {_y}, {_z}+1) and block at ({_x}, {_y}, {_z}+3):
  19. loop-block is cobblestone
  20. add 1 to {_cnt}
  21. if {_cnt} is 3:
  22. set {_d} to "pz"
  23. clear {_cnt}
  24. loop blocks between block at ({_x}, {_y}, {_z}-1) and block at ({_x}, {_y}, {_z}-3):
  25. loop-block is cobblestone
  26. add 1 to {_cnt}
  27. if {_cnt} is 3:
  28. set {_d} to "nz"
  29. {_d} is set
  30. loop 40 times:
  31. if {_d} is "px":
  32. set {_x1} to {_x}+1
  33. set {_x2} to {_x}+3
  34. set {_z1} to {_z}
  35. set {_z2} to {_z}
  36. set {_xz} to "x"
  37. set {_add} to 1
  38. if {_d} is "nx":
  39. set {_x1} to {_x}-1
  40. set {_x2} to {_x}-3
  41. set {_z1} to {_z}
  42. set {_z2} to {_z}
  43. set {_xz} to "x"
  44. set {_add} to -1
  45. if {_d} is "pz":
  46. set {_x1} to {_x}
  47. set {_x2} to {_x}
  48. set {_z1} to {_z}+1
  49. set {_z2} to {_z}+3
  50. set {_xz} to "z"
  51. set {_add} to 1
  52. if {_d} is "nz":
  53. set {_x1} to {_x}
  54. set {_x2} to {_x}
  55. set {_z1} to {_z}-1
  56. set {_z2} to {_z}-3
  57. set {_xz} to "z"
  58. set {_add} to -1
  59. set blocks between the block at ({_x}, {_y}, {_z}) and the block at ({_x2}, {_y}, {_z2}) to air
  60. add {_add} to {_%{_xz}%}
  61. add {_add} to {_%{_xz}%1}
  62. add {_add} to {_%{_xz}%2}
  63. set blocks between the block at ({_x1}, {_y}, {_z1}) and the block at ({_x2}, {_y}, {_z2}) to cobblestone
  64. set block at ({_x}, {_y}, {_z}) to redstone block
  65. loop all players in radius 2 around location at ({_x}, {_y}, {_z}):
  66. loop-player is not player
  67. add 1 to {_break}
  68. if {_break} > 0:
  69. exit loop
  70. set {_wt} to ceil((41-loop-number)/15)+1
  71. wait {_wt} ticks
  72. set blocks between the block at ({_x}, {_y}, {_z}) and the block at ({_x2}, {_y}, {_z2}) to air
  73. spawn primed tnt at ({_x}, {_y}, {_z})
Advertisement
Add Comment
Please, Sign In to add comment