mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 16:50:17 +01:00
Relocate bad call to ProjectileHitEvent
This commit is contained in:
parent
2290e5f85d
commit
5eebb50cf2
1 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
||||||
|
From d53a1a9a43aed5dc7b733fceca073bf954966f27 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AlphaBlend <whizkid3000@hotmail.com>
|
||||||
|
Date: Mon, 21 Nov 2016 22:21:53 -0800
|
||||||
|
Subject: [PATCH] Move ProjectileHitEvent call to proper place
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
|
index 395f30b..9f631d1 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
|
@@ -234,7 +234,7 @@ public class EntityFishingHook extends Entity {
|
||||||
|
// Paper end
|
||||||
|
|
||||||
|
if (movingobjectposition != null) {
|
||||||
|
- org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Include entity in movingobjectposition
|
||||||
|
+ //org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Wrong location, moved down to proper location
|
||||||
|
vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -267,6 +267,7 @@ public class EntityFishingHook extends Entity {
|
||||||
|
|
||||||
|
if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||||
|
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
||||||
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Include entity in movingobjectposition
|
||||||
|
this.hooked = movingobjectposition.entity;
|
||||||
|
this.s();
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.10.0.windows.1
|
||||||
|
|
Loading…
Reference in a new issue