2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/EntityProjectile.java
|
|
|
|
+++ b/net/minecraft/server/EntityProjectile.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -33,6 +33,7 @@
|
|
|
|
this(entitytypes, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.10000000149011612D, entityliving.locZ, world);
|
2014-11-25 22:32:16 +01:00
|
|
|
this.shooter = entityliving;
|
2018-07-15 02:00:00 +02:00
|
|
|
this.shooterId = entityliving.getUniqueID();
|
2014-11-25 22:32:16 +01:00
|
|
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
2016-02-29 22:32:46 +01:00
|
|
|
}
|
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
protected void x_() {}
|
|
|
|
@@ -111,7 +112,7 @@
|
2016-12-22 22:29:23 +01:00
|
|
|
if (entity1.isInteractable()) {
|
2017-09-18 12:00:00 +02:00
|
|
|
if (entity1 == this.d) {
|
2016-12-22 22:29:23 +01:00
|
|
|
flag = true;
|
2017-09-18 12:00:00 +02:00
|
|
|
- } else if (this.shooter != null && this.ticksLived < 2 && this.d == null) {
|
|
|
|
+ } else if (this.shooter != null && this.ticksLived < 2 && this.d == null && this.shooter == entity1) { // CraftBukkit - MC-88491
|
|
|
|
this.d = entity1;
|
2016-12-22 22:29:23 +01:00
|
|
|
flag = true;
|
|
|
|
} else {
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -148,6 +149,11 @@
|
2016-02-29 22:32:46 +01:00
|
|
|
this.e(movingobjectposition.a());
|
2014-11-25 22:32:16 +01:00
|
|
|
} else {
|
|
|
|
this.a(movingobjectposition);
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (this.dead) {
|
2016-11-28 02:47:01 +01:00
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
|
2014-11-25 22:32:16 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|