Archiviert
13
0

SPIGOT-468: Treat wither skulls as projectiles with a shooter for damage purposes.

Dieser Commit ist enthalten in:
md_5 2015-01-25 10:20:00 +11:00
Ursprung e08f5e3d35
Commit ec4ddfb22e

Datei anzeigen

@ -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