Fix EndermanEscapeEvent RUNAWAY being cancelled should also keep target

This will allow you to keep the enderman attacking the player instead
of running away.
This commit is contained in:
Aikar
2018-05-01 17:03:12 -04:00
parent c84c87f8b2
commit c476e3abd1
2 changed files with 10 additions and 10 deletions

View File

@@ -27,15 +27,15 @@ index cc1914d8c..606c0bed8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 01c7fcc8b..f7f9d4897 100644
index 01c7fcc8b..8e6428a0c 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
if ((this.shooterName == null || this.shooterName.isEmpty()) && this.shooter instanceof EntityHuman) {
this.shooterName = this.shooter.getName();
if (this.shooterName != null && this.shooterName.isEmpty()) {
this.shooterName = null;
}
+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterName = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
nbttagcompound.setString("ownerName", this.shooterName == null ? "" : this.shooterName);
this.shooter = this.getShooter();
}
--