mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 08:38:45 +01:00
27 lines
940 B
Diff
27 lines
940 B
Diff
From 89d4f3637d8965b1c72c460a8939ff529e9f1609 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 2bf00b0..ef8225b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
@@ -251,6 +251,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) {
|
|
--
|
|
1.9.1
|
|
|