diff options
author | md_5 <git@md-5.net> | 2017-08-02 18:05:28 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-08-02 18:05:28 +1000 |
commit | 86aa17fae135148be2135a2f678528e2b536c54a (patch) | |
tree | 5269f3f0d6a5e5a612363e7aeb468dfbce8cc4fe | |
parent | 2c5c611d0c3c198c1ac904e8d64051a8437a8720 (diff) | |
download | craftbukkit-86aa17fae135148be2135a2f678528e2b536c54a.tar craftbukkit-86aa17fae135148be2135a2f678528e2b536c54a.tar.gz craftbukkit-86aa17fae135148be2135a2f678528e2b536c54a.tar.lz craftbukkit-86aa17fae135148be2135a2f678528e2b536c54a.tar.xz craftbukkit-86aa17fae135148be2135a2f678528e2b536c54a.zip |
SPIGOT-3482: ProjectileHitEvent for shulker bullet and llama spit
-rw-r--r-- | nms-patches/EntityLlamaSpit.patch | 8 | ||||
-rw-r--r-- | nms-patches/EntityShulkerBullet.patch | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/nms-patches/EntityLlamaSpit.patch b/nms-patches/EntityLlamaSpit.patch index e45072d4..4b284248 100644 --- a/nms-patches/EntityLlamaSpit.patch +++ b/nms-patches/EntityLlamaSpit.patch @@ -9,3 +9,11 @@ private NBTTagCompound b; public EntityLlamaSpit(World world) { +@@ -143,6 +143,7 @@ + } + + public void a(MovingObjectPosition movingobjectposition) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event + if (movingobjectposition.entity != null && this.shooter != null) { + movingobjectposition.entity.damageEntity(DamageSource.a(this, this.shooter).b(), 1.0F); + } diff --git a/nms-patches/EntityShulkerBullet.patch b/nms-patches/EntityShulkerBullet.patch index 5a6bb0ce..915d3747 100644 --- a/nms-patches/EntityShulkerBullet.patch +++ b/nms-patches/EntityShulkerBullet.patch @@ -30,3 +30,11 @@ protected void b(NBTTagCompound nbttagcompound) { BlockPosition blockposition; NBTTagCompound nbttagcompound1; +@@ -287,6 +308,7 @@ + } + + protected void a(MovingObjectPosition movingobjectposition) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event + if (movingobjectposition.entity == null) { + ((WorldServer) this.world).a(EnumParticle.EXPLOSION_LARGE, this.locX, this.locY, this.locZ, 2, 0.2D, 0.2D, 0.2D, 0.0D, new int[0]); + this.a(SoundEffects.gD, 1.0F, 1.0F); |