SPIGOT-1816: Rework drop capture.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-03-07 19:51:42 +11:00
parent 406b2d6204
commit ced78d5d27
6 changed files with 30 additions and 113 deletions

View File

@@ -41,23 +41,15 @@
if (damagesource.i() instanceof EntityArrow && damagesource.getEntity() instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) damagesource.getEntity();
double d0 = entityhuman.locX - this.locX;
@@ -136,9 +145,14 @@
}
} else if (damagesource.getEntity() instanceof EntityCreeper && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).canCauseHeadDrop()) {
@@ -138,6 +147,7 @@
((EntityCreeper) damagesource.getEntity()).setCausedHeadDrop();
- this.a(new ItemStack(Items.SKULL, 1, this.getSkeletonType() == 1 ? 1 : 0), 0.0F);
+ // CraftBukkit start
+ // this.a(new ItemStack(Items.SKULL, 1, this.getSkeletonType() == 1 ? 1 : 0), 0.0F);
+ headDrop = new ItemStack(Items.SKULL, 1, this.getSkeletonType() == 1 ? 1 : 0);
+ // CraftBukkit end
this.a(new ItemStack(Items.SKULL, 1, this.getSkeletonType() == 1 ? 1 : 0), 0.0F);
}
+ super.die(damagesource); // CraftBukkit - moved from above
+
}
protected MinecraftKey J() {
@@ -212,11 +226,30 @@
@@ -212,11 +222,30 @@
}
if (EnchantmentManager.a(Enchantments.ARROW_FIRE, (EntityLiving) this) > 0 || this.getSkeletonType() == 1) {