Is it possible to get the data or custom tag value of the arrow about to be shot. In the process of making custom arrows and I want to be able to distinguish between whether or not a custom arrow is being shot or whether or not a normal arrow is.
Current Code:
Current Code:
Code:
on shoot:
set {FireArrowCount::%shooter%} to 0
loop all items in the inventory of shooter:
if "custom" tag of nbt of loop-item is 91:
set {FireArrowCount::%shooter%} to item amount of loop-item
if {FireArrowCount::%shooter%} is more than 0:
set metadata value "tagName" of projectile to 91
set {FireArrowActive::%shooter%} to 1
while {FireArrowActive::%shooter%} is 1:
wait 1 tick
show mobspawner flames on projectile
on damage:
if projectile exists:
if projectile is arrow:
if metadata value "tagName" of projectile is 91:
loop all items in the inventory of shooter:
if "custom" tag of nbt of loop-item is 91:
set {FireArrowTemp::%shooter%} to item amount of loop-item
if {FireArrowTemp::%shooter%} is the same as {FireArrowCount::%shooter%}:
remove 1 arrow from loop-item
give 1 arrow to shooter
set {FireArrowActive::%shooter%} to 0
ignite victim for 5 seconds
on projectile hit:
if projectile is arrow:
if metadata value "tagName" of projectile is 91:
set {FireArrowTemp::%shooter%} to 0
loop all items in the inventory of shooter:
if "custom" tag of nbt of loop-item is 91:
set {FireArrowTemp::%shooter%} to item amount of loop-item
if {FireArrowTemp::%shooter%} is the same as {FireArrowCount::%shooter%}:
remove 1 arrow from loop-item
give 1 arrow to shooter
set {FireArrowActive::%shooter%} to 0
set {FireArrowBlock::%shooter%} to block 1 in front projectile
add 1 to {FireArrowBlock::%shooter%}'s y-coordinate
if block at {FireArrowBlock::%shooter%} is air:
set block at {FireArrowBlock::%shooter%} to fire