diff options
Diffstat (limited to 'nms-patches/EntityEnderPearl.patch')
-rw-r--r-- | nms-patches/EntityEnderPearl.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/EntityEnderPearl.patch b/nms-patches/EntityEnderPearl.patch index e209aab0..d61d7c67 100644 --- a/nms-patches/EntityEnderPearl.patch +++ b/nms-patches/EntityEnderPearl.patch @@ -1,19 +1,19 @@ --- a/net/minecraft/server/EntityEnderPearl.java +++ b/net/minecraft/server/EntityEnderPearl.java -@@ -1,5 +1,12 @@ +@@ -1,6 +1,12 @@ package net.minecraft.server; + import javax.annotation.Nullable; +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.player.PlayerTeleportEvent; +// CraftBukkit end -+ + public class EntityEnderPearl extends EntityProjectile { - private EntityLiving d; -@@ -59,21 +66,35 @@ +@@ -61,21 +67,35 @@ EntityPlayer entityplayer = (EntityPlayer) entityliving; if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) { @@ -23,6 +23,10 @@ - entityendermite.a(true); - entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch); - this.world.addEntity(entityendermite); +- } +- +- if (entityliving.isPassenger()) { +- entityliving.stopRiding(); + // CraftBukkit start - Fire PlayerTeleportEvent + org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity(); + org.bukkit.Location location = getBukkitEntity().getLocation(); @@ -52,10 +56,6 @@ + CraftEventFactory.entityDamage = null; } - -- if (entityliving.isPassenger()) { -- entityliving.stopRiding(); -- } -- - entityliving.enderTeleportTo(this.locX, this.locY, this.locZ); - entityliving.fallDistance = 0.0F; - entityliving.damageEntity(DamageSource.FALL, 5.0F); |