Paper/Spigot-Server-Patches/0159-Remove-FishingHook-reference-on-Craft-Entity-removal.patch
Zach Brown 974b0afca9
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue,
switching to Mojang's implementation which doesn't appear to share it. I
already removed the important bit in the last upstream merge, this is
just unused and unnecessary now. So we remove it.
2017-04-29 05:27:31 -05:00

31 lines
989 B
Diff

From 0277b11a48f2d4779dd56452aef42aa40783cc43 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 16 Jun 2016 00:17:23 -0400
Subject: [PATCH] Remove FishingHook reference on Craft Entity removal
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
index ecfc316bb..3f909c174 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
@@ -64,6 +64,16 @@ public class CraftFish extends AbstractProjectile implements Fish {
this.biteChance = chance;
}
+ // Paper start
+ @Override
+ public void remove() {
+ super.remove();
+ if (getHandle().owner != null) {
+ getHandle().owner.hookedFish = null;
+ }
+ }
+ // Paper end
+
@Deprecated
public LivingEntity _INVALID_getShooter() {
return (LivingEntity) getShooter();
--
2.12.2.windows.2