Advertisement
miyasoku

TEST

Mar 17th, 2020
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. every tick:
  2. loop all entities:
  3. loop-entity-1 is armor stand
  4. set {fireshot.%loop-entity-1%} to {fireshot.%loop-entity-1%} + 1
  5. on rightclick with gold hoe:
  6. cancel event
  7. execute console command "/execute %player% ~ ~ ~ summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1,Invulnerable:1,DisabledSlots:2039583}"
  8. execute console command "execute %player% ~ ~ ~ playsound minecraft:entity.firework.launch master @a ~ ~ ~ 1 0.9"
  9. loop entities in radius 1 of player:
  10. loop-entity-1 is armor stand
  11. set {fireshot.%loop-entity-1%} to {fireshot.%loop-entity-1%} + 1
  12. if {fireshot.%loop-entity-1%} is 1:
  13. set loop-entity-1's name to "fireshot"
  14. execute console command "/execute %player% ~ ~ ~ tp @e[type=armor_stand,name=fireshot,c=1,r=1] @s"
  15. execute console command "/execute %player% ~ ~ ~ tp @e[type=armor_stand,name=fireshot,c=1,r=1] ~ ~1 ~"
  16. set {xyz2.%loop-entity-1%} to location 1 meter forward location of the loop-entity-1
  17. set {xyzme2.%loop-entity-1%} to location of the loop-entity-1
  18. set {xmotion.%loop-entity-1%} to x-coordinate of {xyz2.%loop-entity-1%} - x-coordinate of {xyzme2.%loop-entity-1%}
  19. set {zmotion.%loop-entity-1%} to z-coordinate of {xyz2.%loop-entity-1%} - z-coordinate of {xyzme2.%loop-entity-1%}
  20. every tick:
  21. loop all entities:
  22. loop-entity-1 is armor stand
  23. if name of loop-entity contains "fireshot":
  24. set {pitch.%loop-entity-1%} to Pitch of location of loop-entity-1
  25. set {pitch.%loop-entity-1%} to {pitch.%loop-entity-1%} + 4
  26. if {pitch.%loop-entity-1%} is more than 91:
  27. set {pitch.%loop-entity-1%} to 90
  28. add "{Rotation:[0f,%{pitch.%loop-entity-1%}%f]}" to nbt of loop-entity-1
  29. set {xyzme.%loop-entity-1%} to location of the loop-entity-1
  30. set {setx.%loop-entity-1%} to x-coordinate of {xyz3.%loop-entity-1%} + {xmotion.%loop-entity-1%} - x-coordinate of {xyzme.%loop-entity-1%}
  31. set {sety.%loop-entity-1%} to y-coordinate of {xyz.%loop-entity-1%} - y-coordinate of {xyzme.%loop-entity-1%}
  32. set {setz.%loop-entity-1%} to z-coordinate of {xyz3.%loop-entity-1%} + {zmotion.%loop-entity-1%} - z-coordinate of {xyzme.%loop-entity-1%}
  33. if {fireshot.%loop-entity-1%} is more than 4:
  34. if {setx.%loop-entity-1%} is more than 0.01:
  35. set {firehit.%loop-entity-1%} to true
  36. if {setx.%loop-entity-1%} is less than -0.01:
  37. set {firehit.%loop-entity-1%} to true
  38. if {sety.%loop-entity-1%} is more than 0.01:
  39. set {firehit.%loop-entity-1%} to true
  40. if {sety.%loop-entity-1%} is less than -0.01:
  41. set {firehit.%loop-entity-1%} to true
  42. if {setz.%loop-entity-1%} is more than 0.01:
  43. set {firehit.%loop-entity-1%} to true
  44. if {setz.%loop-entity-1%} is less than -0.01:
  45. set {firehit.%loop-entity-1%} to true
  46. if {fireshot.%loop-entity-1%} is more than 150:
  47. set loop-entity-1's name to "firekill"
  48. execute console command "/kill @e[type=armor_stand,name=firekill]"
  49. set {xyz.%loop-entity-1%} to location 1 meter forward location of the loop-entity-1
  50. set {xyz3.%loop-entity-1%} to location of the loop-entity-1
  51. set {ymotion.%loop-entity-1%} to y-coordinate of {xyz.%loop-entity-1%} - y-coordinate of {xyzme.%loop-entity-1%}
  52. add "{Motion:[%{xmotion.%loop-entity-1%}%d,%{ymotion.%loop-entity-1%}%d,%{zmotion.%loop-entity-1%}%d]}" to nbt of loop-entity-1
  53. execute console command "/execute @e[type=armor_stand,name=fireshot] ~ ~ ~ particle flame ~ ~ ~ 0.2 0.2 0.2 0 5 force @a"
  54. add "{FallDistance:0}" to nbt of loop-entity-1
  55. if {firehit.%loop-entity-1%} is true:
  56. make a safe explosion of force 1 at the loop-entity-1
  57. set loop-entity-1's name to "firekill"
  58. execute console command "/kill @e[type=armor_stand,name=firekill]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement