summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-04-26 09:26:20 +1000
committermd_5 <git@md-5.net>2016-04-26 09:26:23 +1000
commit4377b86b29aca85a0c6f3e310613330a847a6ab3 (patch)
tree6fa46a580cc6f70957f38953a68b9aa9e62a2a88 /nms-patches
parent22dcde52c9b2e20ae5cb3339f8a2c0ce78b0f929 (diff)
downloadcraftbukkit-4377b86b29aca85a0c6f3e310613330a847a6ab3.tar
craftbukkit-4377b86b29aca85a0c6f3e310613330a847a6ab3.tar.gz
craftbukkit-4377b86b29aca85a0c6f3e310613330a847a6ab3.tar.lz
craftbukkit-4377b86b29aca85a0c6f3e310613330a847a6ab3.tar.xz
craftbukkit-4377b86b29aca85a0c6f3e310613330a847a6ab3.zip
SPIGOT-2218: Drop horse chest on death
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityHorse.patch31
1 files changed, 10 insertions, 21 deletions
diff --git a/nms-patches/EntityHorse.patch b/nms-patches/EntityHorse.patch
index 39e03b08..6030f31b 100644
--- a/nms-patches/EntityHorse.patch
+++ b/nms-patches/EntityHorse.patch
@@ -44,32 +44,21 @@
flag = true;
}
-@@ -652,11 +655,24 @@
+@@ -651,11 +654,11 @@
+ }
public void die(DamageSource damagesource) {
- super.die(damagesource);
-+ /* CraftBukkit start - Handle chest dropping in dropDeathLoot below
+- super.die(damagesource);
++ // super.die(damagesource); // Moved down
if (!this.world.isClientSide) {
this.dropChest();
}
-+ // CraftBukkit end */
-+ }
-+
-+ // CraftBukkit start - Add method
-+ @Override
-+ protected void dropDeathLoot(boolean flag, int i) {
-+ super.dropDeathLoot(flag, i);
-
-+ // Moved from die method above
-+ if (!this.world.isClientSide) {
-+ this.dropChest();
-+ }
+-
++ super.die(damagesource); // CraftBukkit
}
-+ // CraftBukkit end
public void n() {
- if (this.random.nextInt(200) == 0) {
-@@ -666,7 +682,7 @@
+@@ -666,7 +669,7 @@
super.n();
if (!this.world.isClientSide) {
if (this.random.nextInt(900) == 0 && this.deathTicks == 0) {
@@ -78,7 +67,7 @@
}
if (!this.dm() && !this.isVehicle() && this.random.nextInt(300) == 0 && this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ))).getBlock() == Blocks.GRASS) {
-@@ -919,6 +935,7 @@
+@@ -919,6 +922,7 @@
if (this.getOwnerUUID() != null) {
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID().toString());
}
@@ -86,7 +75,7 @@
if (this.hasChest()) {
NBTTagList nbttaglist = new NBTTagList();
-@@ -974,6 +991,12 @@
+@@ -974,6 +978,12 @@
this.setOwnerUUID(UUID.fromString(s));
}
@@ -99,7 +88,7 @@
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
if (attributeinstance != null) {
-@@ -1145,6 +1168,18 @@
+@@ -1145,6 +1155,18 @@
}
public void b(int i) {