diff --git a/CraftBukkit-Patches/0046-Fix-EntityShootBowEvent-with-Skeletons.patch b/CraftBukkit-Patches/0046-Fix-EntityShootBowEvent-with-Skeletons.patch new file mode 100644 index 0000000000..e7711b2423 --- /dev/null +++ b/CraftBukkit-Patches/0046-Fix-EntityShootBowEvent-with-Skeletons.patch @@ -0,0 +1,32 @@ +From 54a96733b7fb128f6b389121c0ef320715f37fd1 Mon Sep 17 00:00:00 2001 +From: Nick Minkler +Date: Sun, 2 Jun 2013 15:04:37 +1000 +Subject: [PATCH] Fix EntityShootBowEvent with Skeletons + + +diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java +index 9494627..f9e0ced 100644 +--- a/src/main/java/net/minecraft/server/EntitySkeleton.java ++++ b/src/main/java/net/minecraft/server/EntitySkeleton.java +@@ -245,6 +245,18 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { + if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.bG()) > 0 || this.getSkeletonType() == 1) { + entityarrow.setOnFire(100); + } ++ // Spigot - Skeletons should throw EntityShootBowEvents ++ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent( this, this.bG(), entityarrow, 1.6F ); ++ if ( event.isCancelled() ) ++ { ++ event.getProjectile().remove(); ++ return; ++ } ++ if ( event.getProjectile() == entityarrow.getBukkitEntity() ) ++ { ++ this.world.addEntity( entityarrow ); ++ } ++ // Spigot end + + this.makeSound("random.bow", 1.0F, 1.0F / (this.aE().nextFloat() * 0.4F + 0.8F)); + this.world.addEntity(entityarrow); +-- +1.8.1.2 +