From ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 25 Jan 2015 10:20:00 +1100 Subject: SPIGOT-468: Treat wither skulls as projectiles with a shooter for damage purposes. --- nms-patches/EntityWitherSkull.patch | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nms-patches/EntityWitherSkull.patch b/nms-patches/EntityWitherSkull.patch index e58b8393..c6268215 100644 --- a/nms-patches/EntityWitherSkull.patch +++ b/nms-patches/EntityWitherSkull.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityWitherSkull.java 2014-11-28 17:43:43.181707433 +0000 -+++ src/main/java/net/minecraft/server/EntityWitherSkull.java 2014-11-28 17:38:20.000000000 +0000 +--- ../work/decompile-8eb82bde/net/minecraft/server/EntityWitherSkull.java 2015-01-25 10:19:25.655554075 +1100 ++++ src/main/java/net/minecraft/server/EntityWitherSkull.java 2015-01-25 10:19:25.655554075 +1100 @@ -1,5 +1,7 @@ package net.minecraft.server; @@ -8,9 +8,12 @@ public class EntityWitherSkull extends EntityFireball { public EntityWitherSkull(World world) { -@@ -36,7 +38,7 @@ +@@ -34,9 +36,9 @@ + if (!this.world.isStatic) { + if (movingobjectposition.entity != null) { if (this.shooter != null) { - if (movingobjectposition.entity.damageEntity(DamageSource.mobAttack(this.shooter), 8.0F)) { +- if (movingobjectposition.entity.damageEntity(DamageSource.mobAttack(this.shooter), 8.0F)) { ++ if (movingobjectposition.entity.damageEntity(DamageSource.projectile(this, shooter), 8.0F)) { // CraftBukkit if (!movingobjectposition.entity.isAlive()) { - this.shooter.heal(5.0F); + this.shooter.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit -- cgit v1.2.3