summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityEnderman.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/EntityEnderman.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/EntityEnderman.patch')
-rw-r--r--nms-patches/EntityEnderman.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/nms-patches/EntityEnderman.patch b/nms-patches/EntityEnderman.patch
new file mode 100644
index 00000000..1fb9b606
--- /dev/null
+++ b/nms-patches/EntityEnderman.patch
@@ -0,0 +1,34 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/EntityEnderman.java 2014-11-27 08:59:46.669421987 +1100
++++ src/main/java/net/minecraft/server/EntityEnderman.java 2014-11-27 08:42:10.140850934 +1100
+@@ -4,6 +4,12 @@
+ import java.util.Set;
+ import java.util.UUID;
+
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityTeleportEvent;
++// CraftBukkit end
++
+ public class EntityEnderman extends EntityMonster {
+
+ private static final UUID b = UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0");
+@@ -165,7 +171,17 @@
+ }
+
+ if (flag1) {
+- super.enderTeleportTo(this.locX, this.locY, this.locZ);
++ // CraftBukkit start - Teleport event
++ // super.enderTeleportTo(this.locX, this.locY, this.locZ);
++ EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.world.getWorld(), d3, d4, d5), new Location(this.world.getWorld(), this.locX, this.locY, this.locZ));
++ this.world.getServer().getPluginManager().callEvent(teleport);
++ if (teleport.isCancelled()) {
++ return false;
++ }
++
++ Location to = teleport.getTo();
++ this.enderTeleportTo(to.getX(), to.getY(), to.getZ());
++ // CraftBukkit end
+ if (this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox())) {
+ flag = true;
+ }