SPIGOT-758: Capture head drops from charged creeper kills
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityInsentient.java 2015-02-26 22:40:22.575608140 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityInsentient.java 2015-02-26 22:40:22.579608139 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityInsentient.java 2015-04-13 11:47:18.931986879 +0100
|
||||
+++ src/main/java/net/minecraft/server/EntityInsentient.java 2015-04-13 11:47:18.935986879 +0100
|
||||
@@ -4,6 +4,15 @@
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -84,7 +84,28 @@
|
||||
}
|
||||
|
||||
public boolean a(Class<? extends EntityLiving> oclass) {
|
||||
@@ -235,11 +277,20 @@
|
||||
@@ -168,6 +210,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
+ protected ItemStack headDrop = null; // CraftBukkit
|
||||
protected void dropDeathLoot(boolean flag, int i) {
|
||||
Item item = this.getLoot();
|
||||
|
||||
@@ -183,6 +226,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ if (headDrop != null) {
|
||||
+ this.a(headDrop, 0.0F);
|
||||
+ headDrop = null;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
@@ -235,11 +284,20 @@
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
super.a(nbttagcompound);
|
||||
@@ -107,7 +128,7 @@
|
||||
NBTTagList nbttaglist;
|
||||
int i;
|
||||
|
||||
@@ -380,11 +431,11 @@
|
||||
@@ -380,11 +438,11 @@
|
||||
double d2 = entityhuman.locZ - this.locZ;
|
||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
|
||||
@@ -121,7 +142,7 @@
|
||||
this.die();
|
||||
} else if (d3 < 1024.0D) {
|
||||
this.ticksFarFromPlayer = 0;
|
||||
@@ -707,6 +758,12 @@
|
||||
@@ -707,6 +765,12 @@
|
||||
|
||||
public final boolean e(EntityHuman entityhuman) {
|
||||
if (this.cc() && this.getLeashHolder() == entityhuman) {
|
||||
@@ -134,7 +155,7 @@
|
||||
this.unleash(true, !entityhuman.abilities.canInstantlyBuild);
|
||||
return true;
|
||||
} else {
|
||||
@@ -714,12 +771,24 @@
|
||||
@@ -714,12 +778,24 @@
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Items.LEAD && this.cb()) {
|
||||
if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) {
|
||||
@@ -159,7 +180,7 @@
|
||||
this.setLeashHolder(entityhuman, true);
|
||||
--itemstack.count;
|
||||
return true;
|
||||
@@ -741,10 +810,12 @@
|
||||
@@ -741,10 +817,12 @@
|
||||
|
||||
if (this.bo) {
|
||||
if (!this.isAlive()) {
|
||||
@@ -172,7 +193,7 @@
|
||||
this.unleash(true, true);
|
||||
}
|
||||
}
|
||||
@@ -811,6 +882,7 @@
|
||||
@@ -811,6 +889,7 @@
|
||||
|
||||
this.bp = entityleash;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user