2

In 1.8.9 I was wondering if you could make a bow shoot like special arrows with a name or something. I wanted to target only arrows shot with a specific bow in my command blocks. Is that possible? And if so, how?

1

In 1.8 you cannot rely on arrows items specifically, as no item data is transferred to the entity.

However, the bow will modify the arrow's damage value depending on the Power enchantment level. You can provide the player with a bow containing a specific Power level and then target arrows that have a particular amount of damage.

damage will normally be 2.0. If Power exists on the bow, the value is incremented by 0.5 and then for each level of Power, it will increase by another 0.5. For example, a Power 3 bow would result in a damage value of 4.0.

Example bow to provide:

/give @p minecraft:bow 1 0 {ench:[{id:48s,lvl:3s}]}

You can assign a score to arrow entities based on their damage tag value.

Objective to create:

/scoreboard objectives add BowType dummy

Example commands to run on a clock, assigning scores to specific arrows (Power 3 to Power 5):

/scoreboard players set @e[type=Arrow] BowType 1 {damage:4.0}
/scoreboard players set @e[type=Arrow] BowType 2 {damage:4.5}
/scoreboard players set @e[type=Arrow] BowType 3 {damage:5.0}

And you can target arrows based on their score.

/say Arrows shot from a Power 3 bow: @e[type=Arrow,score_BowType_min=1,score_BowType=1]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.