mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Remove FishingHook reference on Craft Entity removal
This caused some bugs chickeneer reported to me, with fishing.
This commit is contained in:
parent
d330ae5050
commit
59b9ad36e6
@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
|
||||
@@ -0,0 +0,0 @@ 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();
|
||||
--
|
Loading…
Reference in New Issue
Block a user