Paper/Spigot-Server-Patches/0174-Remove-FishingHook-reference-on-Craft-Entity-removal.patch
Zach Brown 10469dfd46
Remove TE Fixer changes
Ultimately they should be unnecessary now that upstream's fix has been
in place for a while. Removing this reduces our own footprint, and gets
rid of any possible unintended behavior.
2016-10-05 15:46:44 -05:00

31 Zeilen
975 B
Diff

From 9392526a42291798757abda1942e41d5fc2d8ef8 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 ecfc316..3f909c1 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.10.0