mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-31 12:23:51 -07:00
@@ -20,28 +20,25 @@
|
||||
}
|
||||
|
||||
public EntitySmallFireball(World world, double d0, double d1, double d2, double d3, double d4, double d5) {
|
||||
@@ -20,10 +27,17 @@
|
||||
@@ -20,7 +27,16 @@
|
||||
|
||||
if (movingobjectposition.entity != null) {
|
||||
if (!movingobjectposition.entity.isFireProof()) {
|
||||
- flag = movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 5.0F);
|
||||
- if (flag) {
|
||||
- movingobjectposition.entity.setOnFire(5);
|
||||
+ // CraftBukkit start - Entity damage by entity event + combust event
|
||||
+ isIncendiary = movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 5.0F);
|
||||
+ if (isIncendiary) {
|
||||
this.a(this.shooter, movingobjectposition.entity);
|
||||
- movingobjectposition.entity.setOnFire(5);
|
||||
+ EntityCombustByEntityEvent event = new EntityCombustByEntityEvent((org.bukkit.entity.Projectile) this.getBukkitEntity(), movingobjectposition.entity.getBukkitEntity(), 5);
|
||||
+ movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (!event.isCancelled()) {
|
||||
+ movingobjectposition.entity.setOnFire(event.getDuration());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -32,11 +46,15 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
flag = movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 5.0F);
|
||||
if (flag) {
|
||||
this.a(this.shooter, movingobjectposition.entity);
|
||||
@@ -32,11 +48,15 @@
|
||||
flag = this.world.getGameRules().getBoolean("mobGriefing");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user