Update to Minecraft 1.13.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-08-26 12:00:00 +10:00
parent 034c12d001
commit f578d94680
182 changed files with 1891 additions and 1879 deletions

View File

@@ -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");
}