From 2ab5f7ada33f6c9e09be118242e7ff8c5a2f9574 Mon Sep 17 00:00:00 2001
From: Zach <zach.brown@destroystokyo.com>
Date: Fri, 13 Feb 2015 14:50:25 -0600
Subject: [PATCH] Make Enderman drop the block they're holding when they die

---
 ...n-items-outside-EAR-activation-range.patch |  2 +-
 ...e-block-they-re-holding-when-they-di.patch | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 Spigot-Server-Patches/0045-Enderman-drop-the-block-they-re-holding-when-they-di.patch

diff --git a/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch b/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch
index 99a9a0208..a95ba66de 100644
--- a/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch
+++ b/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch
@@ -1,4 +1,4 @@
-From 6b0f89a3a7e237a292da033ae567a745f6bd3a3c Mon Sep 17 00:00:00 2001
+From 823f654e472c921489a122be8373f253aac0b3bb Mon Sep 17 00:00:00 2001
 From: Bestle <tom.roberts00@gmail.com>
 Date: Fri, 13 Feb 2015 14:33:17 -0600
 Subject: [PATCH] Despawn items outside EAR activation range
diff --git a/Spigot-Server-Patches/0045-Enderman-drop-the-block-they-re-holding-when-they-di.patch b/Spigot-Server-Patches/0045-Enderman-drop-the-block-they-re-holding-when-they-di.patch
new file mode 100644
index 000000000..61d94f7c0
--- /dev/null
+++ b/Spigot-Server-Patches/0045-Enderman-drop-the-block-they-re-holding-when-they-di.patch
@@ -0,0 +1,27 @@
+From 33ae554d6f47a2bae0f23671d84a7cc7c5d174ad Mon Sep 17 00:00:00 2001
+From: Zach <zach.brown@destroystokyo.com>
+Date: Fri, 13 Feb 2015 14:49:30 -0600
+Subject: [PATCH] Enderman drop the block they're holding when they die
+
+
+diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
+index fe198c9..6c85f3d 100644
+--- a/src/main/java/net/minecraft/server/EntityEnderman.java
++++ b/src/main/java/net/minecraft/server/EntityEnderman.java
+@@ -239,6 +239,13 @@ public class EntityEnderman extends EntityMonster {
+             }
+         }
+ 
++        // PaperSpigot start - Drop the block the entity is holding when it dies
++        Item carriedItem = Item.getItemOf(getCarried().getBlock());
++        if (carriedItem != null) {
++            this.a(carriedItem, 1);
++        }
++        // PaperSpigot end
++
+     }
+ 
+     public void setCarried(IBlockData iblockdata) {
+-- 
+2.3.0
+