Paper/patches/server/0114-Don-t-let-fishinghooks-use-portals.patch

23 lines
995 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/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index eaa3ed52a57b56fc0f260aadfd23c2fd6dfc0f51..54bd343def9f1ebc987640c5d756db906593f320 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -252,6 +252,11 @@ public class FishingHook extends Projectile {
this.setDeltaMovement(this.getDeltaMovement().scale(0.92D));
this.reapplyPosition();
+ // Paper start - These shouldn't be going through portals
+ if (this.isInsidePortal) {
+ this.discard();
+ }
+ // Paper end
}
}