summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityEnderPearl.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-09-18 20:00:00 +1000
committermd_5 <git@md-5.net>2017-09-18 20:00:00 +1000
commit9a1f5ee80a8665b0c388758003e2bda1ee924084 (patch)
treeb97318e90572fbf8190689d2233eac672d888f70 /nms-patches/EntityEnderPearl.patch
parent8f472147b7f78ccd565bc97a125030f92fdf732d (diff)
downloadcraftbukkit-9a1f5ee80a8665b0c388758003e2bda1ee924084.tar
craftbukkit-9a1f5ee80a8665b0c388758003e2bda1ee924084.tar.gz
craftbukkit-9a1f5ee80a8665b0c388758003e2bda1ee924084.tar.lz
craftbukkit-9a1f5ee80a8665b0c388758003e2bda1ee924084.tar.xz
craftbukkit-9a1f5ee80a8665b0c388758003e2bda1ee924084.zip
Update to Minecraft 1.12.2
Diffstat (limited to 'nms-patches/EntityEnderPearl.patch')
-rw-r--r--nms-patches/EntityEnderPearl.patch16
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);