diff options
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/EntityCreeper.patch | 16 | ||||
-rw-r--r-- | nms-patches/EntityInsentient.patch | 37 | ||||
-rw-r--r-- | nms-patches/EntitySkeleton.patch | 42 | ||||
-rw-r--r-- | nms-patches/EntityZombie.patch | 23 |
4 files changed, 99 insertions, 19 deletions
diff --git a/nms-patches/EntityCreeper.patch b/nms-patches/EntityCreeper.patch index a359edcb..84d0d8fc 100644 --- a/nms-patches/EntityCreeper.patch +++ b/nms-patches/EntityCreeper.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityCreeper.java 2015-02-26 22:40:22.499608140 +0000 -+++ src/main/java/net/minecraft/server/EntityCreeper.java 2015-02-26 22:40:22.499608140 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityCreeper.java 2015-04-13 11:47:18.827986881 +0100 ++++ src/main/java/net/minecraft/server/EntityCreeper.java 2015-04-13 11:47:18.831986881 +0100 @@ -1,5 +1,10 @@ package net.minecraft.server; @@ -19,7 +19,7 @@ public EntityCreeper(World world) { super(world); -@@ -110,19 +116,36 @@ +@@ -110,19 +116,39 @@ } public void die(DamageSource damagesource) { @@ -37,7 +37,11 @@ + // CraftBukkit end } else if (damagesource.getEntity() instanceof EntityCreeper && damagesource.getEntity() != this && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).cp()) { ((EntityCreeper) damagesource.getEntity()).cq(); - this.a(new ItemStack(Items.SKULL, 1, 4), 0.0F); +- this.a(new ItemStack(Items.SKULL, 1, 4), 0.0F); ++ // CraftBukkit start ++ // this.a(new ItemStack(Items.SKULL, 1, 4), 0.0F); ++ headDrop = new ItemStack(Items.SKULL, 1, 4); ++ // CraftBukkit end } + + super.die(damagesource); // CraftBukkit - Moved from above @@ -58,7 +62,7 @@ public boolean r(Entity entity) { return true; -@@ -146,7 +169,21 @@ +@@ -146,7 +172,21 @@ public void onLightningStrike(EntityLightning entitylightning) { super.onLightningStrike(entitylightning); @@ -81,7 +85,7 @@ } protected boolean a(EntityHuman entityhuman) { -@@ -170,8 +207,15 @@ +@@ -170,8 +210,15 @@ boolean flag = this.world.getGameRules().getBoolean("mobGriefing"); float f = this.isPowered() ? 2.0F : 1.0F; diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch index 8c7b3b31..0302af06 100644 --- a/nms-patches/EntityInsentient.patch +++ b/nms-patches/EntityInsentient.patch @@ -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 { diff --git a/nms-patches/EntitySkeleton.patch b/nms-patches/EntitySkeleton.patch index 4f5402ef..b1f340ac 100644 --- a/nms-patches/EntitySkeleton.patch +++ b/nms-patches/EntitySkeleton.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntitySkeleton.java 2015-02-26 22:40:22.683608138 +0000 -+++ src/main/java/net/minecraft/server/EntitySkeleton.java 2015-02-26 22:40:22.687608138 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntitySkeleton.java 2015-04-13 11:47:19.083986875 +0100 ++++ src/main/java/net/minecraft/server/EntitySkeleton.java 2015-04-13 11:47:19.083986875 +0100 @@ -2,6 +2,8 @@ import java.util.Calendar; @@ -25,7 +25,43 @@ } } } -@@ -224,11 +233,30 @@ +@@ -112,7 +121,7 @@ + } + + public void die(DamageSource damagesource) { +- super.die(damagesource); ++ // super.die(damagesource); // CraftBukkit + if (damagesource.i() instanceof EntityArrow && damagesource.getEntity() instanceof EntityHuman) { + EntityHuman entityhuman = (EntityHuman) damagesource.getEntity(); + double d0 = entityhuman.locX - this.locX; +@@ -123,16 +132,25 @@ + } + } else if (damagesource.getEntity() instanceof EntityCreeper && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).cp()) { + ((EntityCreeper) damagesource.getEntity()).cq(); +- 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 ++ + } + ++ super.die(damagesource); // CraftBukkit - moved from above ++ + } + ++ /* CraftBukkit start + protected Item getLoot() { + return Items.ARROW; + } ++ // CraftBukkit end */ + + protected void dropDeathLoot(boolean flag, int i) { ++ super.dropDeathLoot(flag, i); // CraftBukkit + int j; + int k; + +@@ -224,11 +242,30 @@ } if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.bA()) > 0 || this.getSkeletonType() == 1) { diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch index bf729792..add83782 100644 --- a/nms-patches/EntityZombie.patch +++ b/nms-patches/EntityZombie.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityZombie.java 2015-02-26 22:40:22.739608138 +0000 -+++ src/main/java/net/minecraft/server/EntityZombie.java 2015-02-26 22:40:22.739608138 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityZombie.java 2015-04-13 11:47:19.167986873 +0100 ++++ src/main/java/net/minecraft/server/EntityZombie.java 2015-04-13 11:47:19.167986873 +0100 @@ -4,6 +4,14 @@ import java.util.List; import java.util.UUID; @@ -115,3 +115,22 @@ boolean flag = this.bp > 0.0F && this.bq > 0.0F; this.bp = f; +@@ -520,12 +549,16 @@ + } + + public void die(DamageSource damagesource) { +- super.die(damagesource); ++ // super.die(damagesource); // CraftBukkit + if (damagesource.getEntity() instanceof EntityCreeper && !(this instanceof EntityPigZombie) && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).cp()) { + ((EntityCreeper) damagesource.getEntity()).cq(); +- this.a(new ItemStack(Items.SKULL, 1, 2), 0.0F); ++ // CraftBukkit start ++ // this.a(new ItemStack(Items.SKULL, 1, 2), 0.0F); ++ headDrop = new ItemStack(Items.SKULL, 1, 2); ++ // CraftBukkit end + } + ++ super.die(damagesource); // CraftBukkit - moved from above + } + + static class SyntheticClass_1 { } |