Paper/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch
Shane Freeder 2609a118e8 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f4f2ef4c SPIGOT-6222: Correct javadoc for Entity#setPassenger
1871ca9d #559: Add wait time modification for FishHook

CraftBukkit Changes:
bc6a175e #767: Add wait time modification for FishHook
2fc37bcc SPIGOT-6197: Prevent world loading from updating spawn settings of all worlds
2020-11-07 00:19:04 +00:00

23 lines
911 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 16 Dec 2016 16:03:19 -0600
Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 9db1c891b69d4fbe163b3272f22351f3d0b306d1..9ab0a4638c36d46327435eec4745d2746819d9b0 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -201,6 +201,11 @@ public class EntityFishingHook extends IProjectile {
this.setMot(this.getMot().a(0.92D));
this.af();
+ // Paper start - These shouldn't be going through portals
+ if (this.inPortal) {
+ this.die();
+ }
+ // Paper end
}
}