diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/EntityProjectile.patch | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/EntityProjectile.patch')
-rw-r--r-- | nms-patches/EntityProjectile.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nms-patches/EntityProjectile.patch b/nms-patches/EntityProjectile.patch new file mode 100644 index 00000000..bd4789e6 --- /dev/null +++ b/nms-patches/EntityProjectile.patch @@ -0,0 +1,31 @@ +--- ../work/decompile-bb26c12b/net/minecraft/server/EntityProjectile.java 2014-11-27 08:59:46.725421741 +1100 ++++ src/main/java/net/minecraft/server/EntityProjectile.java 2014-11-27 08:42:10.140850934 +1100 +@@ -25,6 +25,7 @@ + public EntityProjectile(World world, EntityLiving entityliving) { + super(world); + this.shooter = entityliving; ++ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit + this.a(0.25F, 0.25F); + this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch); + this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F); +@@ -130,7 +131,7 @@ + MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); + + if (movingobjectposition1 != null) { +- double d1 = vec3d.f(movingobjectposition1.pos); ++ double d1 = vec3d.distanceSquared(movingobjectposition1.pos); // CraftBukkit - distance efficiency + + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; +@@ -150,6 +151,11 @@ + this.aq(); + } else { + this.a(movingobjectposition); ++ // CraftBukkit start ++ if (this.dead) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); ++ } ++ // CraftBukkit end + } + } + |