Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
b6925c36af
This is now default vanilla behavior Fixes #3644
37 Zeilen
1.6 KiB
Diff
37 Zeilen
1.6 KiB
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/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7..de126bf6c95e90dd9a81ee8d815806b8908709ec 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -162,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
public boolean ac;
|
|
public boolean impulse;
|
|
public int portalCooldown;
|
|
- protected boolean inPortal;
|
|
+ protected boolean inPortal; public final boolean inPortal() { return this.inPortal; } // Paper - OBFHELPER
|
|
protected int portalTicks;
|
|
protected BlockPosition ah;
|
|
protected Vec3D ai;
|
|
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
index ab8f67c11419cc788fc3cb814d2224e65217dd08..13b46c59b9a017bfa985ad74f80eca77608d1891 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
@@ -191,6 +191,12 @@ public class EntityFishingHook extends IProjectile {
|
|
|
|
this.setMot(this.getMot().a(0.92D));
|
|
this.ac();
|
|
+
|
|
+ // Paper start - These shouldn't be going through portals
|
|
+ if (this.inPortal()) {
|
|
+ this.die();
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
}
|
|
|