SPIGOT-2836: ProjectileHitEvent not always firing for FishHook
This commit is contained in:
parent
83fd16e453
commit
a0d5a841da
@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
public class EntityFishingHook extends Entity {
|
public class EntityFishingHook extends Entity {
|
||||||
|
|
||||||
@@ -220,6 +225,7 @@
|
@@ -251,6 +256,7 @@
|
||||||
vec3d = new Vec3D(this.locX, this.locY, this.locZ);
|
|
||||||
vec3d1 = new Vec3D(this.locX + this.motX, this.locY + this.motY, this.locZ + this.motZ);
|
|
||||||
if (movingobjectposition != null) {
|
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
|
|
||||||
vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||||
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
|
||||||
|
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
||||||
|
this.hooked = movingobjectposition.entity;
|
||||||
|
this.s();
|
||||||
@@ -283,6 +289,10 @@
|
@@ -283,6 +289,10 @@
|
||||||
if (this.g <= 0) {
|
if (this.g <= 0) {
|
||||||
this.h = 0;
|
this.h = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user