[SPIGOT-5121] Method to set PierceLevel of arrows Created: 29/Jun/19  Updated: 01/Jul/19  Resolved: 29/Jun/19

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Utku Akyıldız Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: 1.14.3
Guidelines Read: Yes

 Description   

https://minecraft.gamepedia.com/Arrow#Normal_and_tipped_arrows

I couldnt find a way to set PierceLevel of an arrow I spawn, is it possible right now?

If it isnt can you add a method for it? thanks in advance



 Comments   
Comment by md_5 [ 01/Jul/19 ]

The API method is correctly setting the pierce level.

If there is something else required to make an arrow pierce other than the PierceLevel NBT, then that is outside the scope of this ticket.

I suggest experimenting with /summon to check that

Comment by Utku Akyıldız [ 30/Jun/19 ]

Hey thanks for fast reply but I think it does not work, here is my tests:

I use #setPierceLevel(5}; on my custom projectile, then on ProjectileHitEvent, I am printing arrow#getPierceLevel() on console which returns 5. But it does not pierce through entity.

I tried this with an enchanted crossbow(Piercing ench level 3), arrow#getPierceLevel() returns 3 and it pierces through target.

Comment by md_5 [ 29/Jun/19 ]

Added

Generated at Wed Dec 17 17:21:22 UTC 2025 using Jira 10.3.15#10030015-sha1:909cc43d292ca09e774c1a243d9819be3f2628cd.