@@ -1,31 +1,14 @@
|
||||
--- a/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/net/minecraft/server/EntityProjectile.java
|
||||
@@ -32,6 +32,7 @@
|
||||
this(entitytypes, entityliving.locX(), entityliving.getHeadY() - 0.10000000149011612D, entityliving.locZ(), world);
|
||||
this.shooter = entityliving;
|
||||
this.shooterId = entityliving.getUniqueID();
|
||||
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
||||
}
|
||||
@@ -42,6 +42,11 @@
|
||||
|
||||
public void a(Entity entity, float f, float f1, float f2, float f3, float f4) {
|
||||
@@ -83,7 +84,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
- if (this.shooter != null && this.ticksLived < 2 && this.ap == null) {
|
||||
+ if (this.shooter != null && this.ticksLived < 2 && this.ap == null && this.shooter == entity) { // CraftBukkit - MC-88491
|
||||
this.ap = entity;
|
||||
this.aq = 3;
|
||||
break;
|
||||
@@ -103,6 +104,11 @@
|
||||
this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition());
|
||||
} else {
|
||||
this.a(movingobjectposition);
|
||||
+ // CraftBukkit start
|
||||
+ if (this.dead) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && !flag) {
|
||||
this.a(movingobjectposition);
|
||||
+ // CraftBukkit start
|
||||
+ if (this.dead) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
Vec3D vec3d = this.getMot();
|
||||
|
||||
Reference in New Issue
Block a user