2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-12-16 22:03:56 +00:00
|
|
|
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/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2020-06-25 12:04:34 +00:00
|
|
|
index 2175ce0830701568024ed4d45164ba8ae0ec8548..33262be7f883afeca6a8662ffcb5c44a4800e657 100644
|
2016-12-16 22:03:56 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2020-06-25 12:04:34 +00:00
|
|
|
@@ -163,7 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
2019-12-11 23:43:22 +00:00
|
|
|
public boolean ac;
|
2016-12-16 22:03:56 +00:00
|
|
|
public boolean impulse;
|
|
|
|
public int portalCooldown;
|
2020-06-25 12:04:34 +00:00
|
|
|
- protected boolean inPortal;
|
|
|
|
+ protected boolean inPortal; public final boolean inPortal() { return this.inPortal; } // Paper - OBFHELPER
|
|
|
|
protected int portalTicks;
|
|
|
|
protected BlockPosition ah;
|
|
|
|
protected Vec3D ai;
|
2016-12-16 22:03:56 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
2020-06-25 12:04:34 +00:00
|
|
|
index ab8f67c11419cc788fc3cb814d2224e65217dd08..13b46c59b9a017bfa985ad74f80eca77608d1891 100644
|
2016-12-16 22:03:56 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
2020-06-25 12:04:34 +00:00
|
|
|
@@ -191,6 +191,12 @@ public class EntityFishingHook extends IProjectile {
|
2019-04-27 06:26:04 +00:00
|
|
|
|
|
|
|
this.setMot(this.getMot().a(0.92D));
|
2020-06-25 12:04:34 +00:00
|
|
|
this.ac();
|
2016-12-16 22:03:56 +00:00
|
|
|
+
|
|
|
|
+ // Paper start - These shouldn't be going through portals
|
|
|
|
+ if (this.inPortal()) {
|
|
|
|
+ this.die();
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|