Commits

md_5 authored 922e0a1a7f5
SPIGOT-341: Backport ender pearl spawning fix from 1.8.1
No tags

nms-patches/EntityEnderPearl.patch

Modified
1 ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityEnderPearl.java 2014-11-28 17:43:43.085707435 +0000
2 -+++ src/main/java/net/minecraft/server/EntityEnderPearl.java 2014-11-28 17:38:24.000000000 +0000
3 -@@ -1,5 +1,11 @@
1 +--- ../work/decompile-8eb82bde/net/minecraft/server/EntityEnderPearl.java 2015-01-05 10:11:38.333916086 +1100
2 ++++ src/main/java/net/minecraft/server/EntityEnderPearl.java 2015-01-05 10:11:38.333916086 +1100
3 +@@ -1,7 +1,20 @@
4 4 package net.minecraft.server;
5 5
6 6 +// CraftBukkit start
7 7 +import org.bukkit.Bukkit;
8 8 +import org.bukkit.craftbukkit.event.CraftEventFactory;
9 9 +import org.bukkit.event.player.PlayerTeleportEvent;
10 10 +// CraftBukkit end
11 11 +
12 12 public class EntityEnderPearl extends EntityProjectile {
13 13
14 ++ // CraftBukkit start
15 ++ // This is backported from 1.8.1
16 ++ public EntityEnderPearl(World world) {
17 ++ super(world);
18 ++ }
19 ++ // CraftBukkit end
20 ++
14 21 public EntityEnderPearl(World world, EntityLiving entityliving) {
15 -@@ -29,14 +35,28 @@
22 + super(world, entityliving);
23 + }
24 +@@ -29,14 +42,28 @@
16 25 entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
17 26 this.world.addEntity(entityendermite);
18 27 }
19 28 -
20 29 - if (entityliving.av()) {
21 30 - entityliving.mount((Entity) null);
22 31 +
23 32 + // CraftBukkit start - Fire PlayerTeleportEvent
24 33 + org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
25 34 + org.bukkit.Location location = getBukkitEntity().getLocation();

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut