testserver/patches/removed/1.18.2/0115-Don-t-let-fishinghooks...

25 lines
1.1 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
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
2022-03-11 20:13:46 +00:00
Fishing hooks have canChangeDimensions to false, preventing them from being able to switch dimensions
via portals.
2021-06-11 12:02:28 +00:00
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
2022-03-01 05:43:03 +00:00
index 24192a91d9f5c890a316ec150d4aec84073cb61a..3b23279ce994b9684dbc10157839f5fc47edfabd 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
2022-03-01 05:43:03 +00:00
@@ -255,6 +255,11 @@ public class FishingHook extends Projectile {
2021-06-11 12:02:28 +00:00
this.setDeltaMovement(this.getDeltaMovement().scale(0.92D));
this.reapplyPosition();
+ // Paper start - These shouldn't be going through portals
+ if (this.isInsidePortal) {
+ this.discard();
2021-06-11 12:02:28 +00:00
+ }
+ // Paper end
}
}