Update to Minecraft 1.13-pre7

This commit is contained in:
md_5
2018-07-15 10:00:00 +10:00
parent 57ab4cfc6f
commit 421c1728c8
608 changed files with 17788 additions and 9378 deletions

View File

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