From 6f032cdc8ab6bc4eeefeecd3fde8ba8fbde18f0f Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 2 Mar 2016 16:48:00 +0000 Subject: [PATCH] Fix a mistake in EntityEnderPearl causing a double teleport --- nms-patches/EntityEnderPearl.patch | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/nms-patches/EntityEnderPearl.patch b/nms-patches/EntityEnderPearl.patch index bc01356dd0..7e5dfe53d8 100644 --- a/nms-patches/EntityEnderPearl.patch +++ b/nms-patches/EntityEnderPearl.patch @@ -12,7 +12,7 @@ public class EntityEnderPearl extends EntityProjectile { private EntityLiving d; -@@ -51,13 +57,35 @@ +@@ -51,21 +57,35 @@ EntityPlayer entityplayer = (EntityPlayer) entityliving; if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) { @@ -50,7 +50,15 @@ + entityliving.damageEntity(DamageSource.FALL, 5.0F); + CraftEventFactory.entityDamage = null; } +- +- if (entityliving.isPassenger()) { +- this.stopRiding(); +- } +- +- entityliving.enderTeleportTo(this.locX, this.locY, this.locZ); +- entityliving.fallDistance = 0.0F; +- entityliving.damageEntity(DamageSource.FALL, 5.0F); + // CraftBukkit end - - if (entityliving.isPassenger()) { - this.stopRiding(); + } + } else if (entityliving != null) { + entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);