Custom piercing arrow 1.14

Discussion in 'Spigot Plugin Development' started by EvrimSen, Jun 29, 2019.

  1. Thanks I did that and md_5 responded quickly :D

    But it didnt work for me, waiting for reply from him
  2. But when I shoot a bow from crossbow (no enchantment) and set the arrow's piercing level (AbstractArrow#setPierceLevel) it works.

    So I tried changing my custom arrow's NBT data: ShotFromCrossbow:0b to ShotFromCrossbow:1b but it doesn't work.

    I checked NBT data of arrows, they are same but my custom arrow doesn't work while the ones shoot from crossbows does. Any idea?
  3. Can you post your custom arrow code and method of registering it? Also make sure it is your custom arrow.
  4. Code (Java):
    Projectile p = caster.launchProjectile(projectileType);
    ((Arrow) p).setPierceLevel(piercing);
    Like I said I read and make sure all NBT datas are same (of arrows), like ShotFromCrossbow and piercing level thing, even crit
  5. Check the NMS class for EntityArrow, and then check the bow and crossbow classes to see how they differ in instantiating the arrow entity.

    Hope this helps