From 9a1f5ee80a8665b0c388758003e2bda1ee924084 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 18 Sep 2017 20:00:00 +1000 Subject: Update to Minecraft 1.12.2 --- nms-patches/EntityEnderPearl.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nms-patches/EntityEnderPearl.patch') 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); -- cgit v1.2.3