Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every tick:
- loop all entities:
- loop-entity-1 is armor stand
- set {fireshot.%loop-entity-1%} to {fireshot.%loop-entity-1%} + 1
- on rightclick with gold hoe:
- cancel event
- execute console command "/execute %player% ~ ~ ~ summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1,Invulnerable:1,DisabledSlots:2039583}"
- execute console command "execute %player% ~ ~ ~ playsound minecraft:entity.firework.launch master @a ~ ~ ~ 1 0.9"
- loop entities in radius 1 of player:
- loop-entity-1 is armor stand
- set {fireshot.%loop-entity-1%} to {fireshot.%loop-entity-1%} + 1
- if {fireshot.%loop-entity-1%} is 1:
- set loop-entity-1's name to "fireshot"
- execute console command "/execute %player% ~ ~ ~ tp @e[type=armor_stand,name=fireshot,c=1,r=1] @s"
- execute console command "/execute %player% ~ ~ ~ tp @e[type=armor_stand,name=fireshot,c=1,r=1] ~ ~1 ~"
- set {xyz2.%loop-entity-1%} to location 1 meter forward location of the loop-entity-1
- set {xyzme2.%loop-entity-1%} to location of the loop-entity-1
- set {xmotion.%loop-entity-1%} to x-coordinate of {xyz2.%loop-entity-1%} - x-coordinate of {xyzme2.%loop-entity-1%}
- set {zmotion.%loop-entity-1%} to z-coordinate of {xyz2.%loop-entity-1%} - z-coordinate of {xyzme2.%loop-entity-1%}
- every tick:
- loop all entities:
- loop-entity-1 is armor stand
- if name of loop-entity contains "fireshot":
- set {pitch.%loop-entity-1%} to Pitch of location of loop-entity-1
- set {pitch.%loop-entity-1%} to {pitch.%loop-entity-1%} + 4
- if {pitch.%loop-entity-1%} is more than 91:
- set {pitch.%loop-entity-1%} to 90
- add "{Rotation:[0f,%{pitch.%loop-entity-1%}%f]}" to nbt of loop-entity-1
- set {xyzme.%loop-entity-1%} to location of the loop-entity-1
- set {setx.%loop-entity-1%} to x-coordinate of {xyz3.%loop-entity-1%} + {xmotion.%loop-entity-1%} - x-coordinate of {xyzme.%loop-entity-1%}
- set {sety.%loop-entity-1%} to y-coordinate of {xyz.%loop-entity-1%} - y-coordinate of {xyzme.%loop-entity-1%}
- set {setz.%loop-entity-1%} to z-coordinate of {xyz3.%loop-entity-1%} + {zmotion.%loop-entity-1%} - z-coordinate of {xyzme.%loop-entity-1%}
- if {fireshot.%loop-entity-1%} is more than 4:
- if {setx.%loop-entity-1%} is more than 0.01:
- set {firehit.%loop-entity-1%} to true
- if {setx.%loop-entity-1%} is less than -0.01:
- set {firehit.%loop-entity-1%} to true
- if {sety.%loop-entity-1%} is more than 0.01:
- set {firehit.%loop-entity-1%} to true
- if {sety.%loop-entity-1%} is less than -0.01:
- set {firehit.%loop-entity-1%} to true
- if {setz.%loop-entity-1%} is more than 0.01:
- set {firehit.%loop-entity-1%} to true
- if {setz.%loop-entity-1%} is less than -0.01:
- set {firehit.%loop-entity-1%} to true
- if {fireshot.%loop-entity-1%} is more than 150:
- set loop-entity-1's name to "firekill"
- execute console command "/kill @e[type=armor_stand,name=firekill]"
- set {xyz.%loop-entity-1%} to location 1 meter forward location of the loop-entity-1
- set {xyz3.%loop-entity-1%} to location of the loop-entity-1
- set {ymotion.%loop-entity-1%} to y-coordinate of {xyz.%loop-entity-1%} - y-coordinate of {xyzme.%loop-entity-1%}
- add "{Motion:[%{xmotion.%loop-entity-1%}%d,%{ymotion.%loop-entity-1%}%d,%{zmotion.%loop-entity-1%}%d]}" to nbt of loop-entity-1
- execute console command "/execute @e[type=armor_stand,name=fireshot] ~ ~ ~ particle flame ~ ~ ~ 0.2 0.2 0.2 0 5 force @a"
- add "{FallDistance:0}" to nbt of loop-entity-1
- if {firehit.%loop-entity-1%} is true:
- make a safe explosion of force 1 at the loop-entity-1
- set loop-entity-1's name to "firekill"
- execute console command "/kill @e[type=armor_stand,name=firekill]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement