mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
MC-88491: Fix projectile colliding with shooter
In some situations, a projectile made collide with the entity that shot it. This occurs because the game sets the ignored entity incorrectly. Our fix is to ensure that the shooter is the only entity that gets ignored by the projectile. By: Zach Brown <zach.brown@destroystokyo.com>
This commit is contained in:
parent
2b518036f5
commit
64b9c40cd7
@ -8,6 +8,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void i() {}
|
protected void i() {}
|
||||||
|
@@ -127,7 +128,7 @@
|
||||||
|
if (entity1.isInteractable()) {
|
||||||
|
if (entity1 == this.c) {
|
||||||
|
flag = true;
|
||||||
|
- } else if (this.shooter != null && this.ticksLived < 2 && this.c == null) {
|
||||||
|
+ } else if (this.shooter != null && this.ticksLived < 2 && this.c == null && this.shooter == entity1) { // CraftBukkit - MC-88491
|
||||||
|
this.c = entity1;
|
||||||
|
flag = true;
|
||||||
|
} else {
|
||||||
@@ -164,6 +165,11 @@
|
@@ -164,6 +165,11 @@
|
||||||
this.e(movingobjectposition.a());
|
this.e(movingobjectposition.a());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user