mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
36f34f01c0
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: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
37 lines
1.6 KiB
Diff
37 lines
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 1aade318ef9b2ecd867a0301c79fb082a78d45c7..3b948d0805c86e2fbaf58b06736144c87cadf179 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -161,7 +161,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
public boolean ac;
|
|
public boolean impulse;
|
|
public int portalCooldown;
|
|
- protected boolean af;
|
|
+ protected boolean af; public final boolean inPortal() { return this.af; } // Paper - OBFHELPER
|
|
protected int ag;
|
|
public DimensionManager dimension;
|
|
protected BlockPosition ai;
|
|
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
index 40bdcf4e75bb36385e82ba8b8f2471760072705a..39e3bd37956d7e0a4d5f784a581e17a77b71f78b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
|
@@ -160,6 +160,12 @@ public class EntityFishingHook extends Entity {
|
|
|
|
this.setMot(this.getMot().a(0.92D));
|
|
this.Z();
|
|
+
|
|
+ // Paper start - These shouldn't be going through portals
|
|
+ if (this.inPortal()) {
|
|
+ this.die();
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
}
|
|
|