mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
[Bleeding] Call DamageEvent before CombustEvent for Arrows. Fixes BUKKIT-1100
This commit is contained in:
parent
3054d020d3
commit
b4c9ad518a
@ -211,8 +211,9 @@ public class EntityArrow extends Entity {
|
|||||||
damagesource = DamageSource.arrow(this, this.shooter);
|
damagesource = DamageSource.arrow(this, this.shooter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CraftBukkit start - moved damage call
|
||||||
|
if (movingobjectposition.entity.damageEntity(damagesource, l)) {
|
||||||
if (this.isBurning() && (!(movingobjectposition.entity instanceof EntityPlayer) || this.world.pvpMode)) { // CraftBukkit - abide by pvp setting if destination is a player.
|
if (this.isBurning() && (!(movingobjectposition.entity instanceof EntityPlayer) || this.world.pvpMode)) { // CraftBukkit - abide by pvp setting if destination is a player.
|
||||||
// CraftBukkit start
|
|
||||||
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
||||||
Bukkit.getPluginManager().callEvent(combustEvent);
|
Bukkit.getPluginManager().callEvent(combustEvent);
|
||||||
|
|
||||||
@ -222,7 +223,7 @@ public class EntityArrow extends Entity {
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movingobjectposition.entity.damageEntity(damagesource, l)) {
|
//if (movingobjectposition.entity.damageEntity(damagesource, l)) { // CraftBukkit
|
||||||
if (movingobjectposition.entity instanceof EntityLiving) {
|
if (movingobjectposition.entity instanceof EntityLiving) {
|
||||||
++((EntityLiving) movingobjectposition.entity).aI;
|
++((EntityLiving) movingobjectposition.entity).aI;
|
||||||
if (this.n > 0) {
|
if (this.n > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user