mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
9788250b10
This fixes a bug with obfuscation helpers for attack cooldown But every other change should stay the same. Cleaning up a lot of helpers that pointed to already unobfuscated items. Also adds final to many of the obfhelpers to assist with inlining. This is pretty much a patch maintenance
36 lines
1.6 KiB
Diff
36 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 62516bd33f52c01502157def48601f129e49b618..a82cafc57b4ac27c3920e30c999c1a36478e9f7c 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..588997ffe1e1d9bbc17a2fe64063138bde1469b8 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
|
|
}
|
|
}
|
|
|