mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -8,37 +8,37 @@
|
||||
|
||||
public class EntityFireworks extends Entity {
|
||||
|
||||
@@ -117,8 +118,12 @@
|
||||
@@ -114,8 +115,12 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
||||
- this.world.broadcastEntityEffect(this, (byte) 17);
|
||||
- this.k();
|
||||
- this.i();
|
||||
+ // CraftBukkit start
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
|
||||
+ this.world.broadcastEntityEffect(this, (byte) 17);
|
||||
+ this.k();
|
||||
+ this.i();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.die();
|
||||
}
|
||||
|
||||
@@ -136,7 +141,9 @@
|
||||
@@ -133,7 +138,9 @@
|
||||
|
||||
if (f > 0.0F) {
|
||||
if (this.e != null) {
|
||||
+ CraftEventFactory.entityDamage = this; // CraftBukkit
|
||||
this.e.damageEntity(DamageSource.t, (float) (5 + nbttaglist.size() * 2));
|
||||
this.e.damageEntity(DamageSource.FIREWORKS, (float) (5 + nbttaglist.size() * 2));
|
||||
+ CraftEventFactory.entityDamage = null; // CraftBukkit
|
||||
}
|
||||
|
||||
double d0 = 5.0D;
|
||||
@@ -162,7 +169,9 @@
|
||||
@@ -159,7 +166,9 @@
|
||||
if (flag) {
|
||||
float f1 = f * (float) Math.sqrt((5.0D - (double) this.g(entityliving)) / 5.0D);
|
||||
|
||||
+ CraftEventFactory.entityDamage = this; // CraftBukkit
|
||||
entityliving.damageEntity(DamageSource.t, f1);
|
||||
entityliving.damageEntity(DamageSource.FIREWORKS, f1);
|
||||
+ CraftEventFactory.entityDamage = null; // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user