summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2015-01-25 10:20:00 +1100
committermd_5 <git@md-5.net>2015-01-25 10:20:00 +1100
commitec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0 (patch)
treebb4d3163e76e1cff362d522960fc00f5fc1b9719
parente08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60 (diff)
downloadcraftbukkit-ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0.tar
craftbukkit-ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0.tar.gz
craftbukkit-ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0.tar.lz
craftbukkit-ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0.tar.xz
craftbukkit-ec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0.zip
SPIGOT-468: Treat wither skulls as projectiles with a shooter for damage purposes.
-rw-r--r--nms-patches/EntityWitherSkull.patch11
1 files 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