summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-07-01 12:30:28 +1000
committermd_5 <git@md-5.net>2016-07-01 12:30:28 +1000
commit56813c7ffff77070a90c6520ee60519d2e444788 (patch)
tree555b936b7fd7c26418a13e4a5aa72a3fa980e6ef /nms-patches
parent3804ba654e0e905f16e19108939877c1e322c4d9 (diff)
downloadcraftbukkit-56813c7ffff77070a90c6520ee60519d2e444788.tar
craftbukkit-56813c7ffff77070a90c6520ee60519d2e444788.tar.gz
craftbukkit-56813c7ffff77070a90c6520ee60519d2e444788.tar.lz
craftbukkit-56813c7ffff77070a90c6520ee60519d2e444788.tar.xz
craftbukkit-56813c7ffff77070a90c6520ee60519d2e444788.zip
SPIGOT-1468: ENDER_PEARL SpawnReason
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityEnderPearl.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/nms-patches/EntityEnderPearl.patch b/nms-patches/EntityEnderPearl.patch
index 62cc9bf6..d175b03e 100644
--- a/nms-patches/EntityEnderPearl.patch
+++ b/nms-patches/EntityEnderPearl.patch
@@ -1,18 +1,19 @@
--- a/net/minecraft/server/EntityEnderPearl.java
+++ b/net/minecraft/server/EntityEnderPearl.java
-@@ -1,5 +1,11 @@
+@@ -1,5 +1,12 @@
package net.minecraft.server;
+// 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;
-@@ -55,21 +61,35 @@
+@@ -55,21 +62,35 @@
EntityPlayer entityplayer = (EntityPlayer) entityliving;
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
@@ -37,7 +38,7 @@
+
+ entityendermite.a(true);
+ entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
-+ this.world.addEntity(entityendermite);
++ this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
+ }
+
+ if (entityliving.isPassenger()) {