From 6b52023a5c341420d976cb50359e2a2a4a6a9192 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 17 Nov 2016 12:42:16 -0800 Subject: [PATCH] Make Wither Skulls respect Block.canEntityDestroy. Closes #3404 --- .../minecraft/net/minecraft/block/Block.java.patch | 7 ++++--- .../entity/projectile/EntityWitherSkull.java.patch | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 patches/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java.patch diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 16256f647d..cfeb7eacbd 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -212,7 +212,7 @@ public SoundType func_185467_w() { return this.field_149762_H; -@@ -893,6 +915,1186 @@ +@@ -893,6 +915,1187 @@ return "Block{" + field_149771_c.func_177774_c(this) + "}"; } @@ -1026,7 +1026,8 @@ + this != net.minecraft.init.Blocks.field_150411_aY && + this != net.minecraft.init.Blocks.field_185775_db; + } -+ else if (entity instanceof net.minecraft.entity.boss.EntityWither) ++ else if ((entity instanceof net.minecraft.entity.boss.EntityWither) || ++ (entity instanceof net.minecraft.entity.projectile.EntityWitherSkull)) + { + return net.minecraft.entity.boss.EntityWither.func_181033_a(this); + } @@ -1399,7 +1400,7 @@ public static void func_149671_p() { func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air")); -@@ -1169,11 +2371,7 @@ +@@ -1169,11 +2372,7 @@ } else { diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java.patch new file mode 100644 index 0000000000..7a9cc9450f --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java.patch @@ -0,0 +1,11 @@ +--- ../src-base/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java ++++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java +@@ -62,7 +62,7 @@ + float f = super.func_180428_a(p_180428_1_, p_180428_2_, p_180428_3_, p_180428_4_); + Block block = p_180428_4_.func_177230_c(); + +- if (this.func_82342_d() && EntityWither.func_181033_a(block)) ++ if (this.func_82342_d() && block.canEntityDestroy(p_180428_4_, p_180428_2_, p_180428_3_, this)) + { + f = Math.min(0.8F, f); + }