2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/EntityProjectile.java
|
|
|
|
+++ b/net/minecraft/server/EntityProjectile.java
|
2016-03-01 05:32:46 +08:00
|
|
|
@@ -34,6 +34,7 @@
|
2014-11-26 05:32:16 +08:00
|
|
|
public EntityProjectile(World world, EntityLiving entityliving) {
|
2016-03-01 05:32:46 +08:00
|
|
|
this(world, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.10000000149011612D, entityliving.locZ);
|
2014-11-26 05:32:16 +08:00
|
|
|
this.shooter = entityliving;
|
|
|
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
2016-03-01 05:32:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void i() {}
|
|
|
|
@@ -161,6 +162,11 @@
|
|
|
|
this.e(movingobjectposition.a());
|
2014-11-26 05:32:16 +08:00
|
|
|
} else {
|
|
|
|
this.a(movingobjectposition);
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (this.dead) {
|
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this);
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|