Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -8,7 +8,7 @@
public class EntityWitherSkull extends EntityFireball {
private static final DataWatcherObject<Boolean> f = DataWatcher.a(EntityWitherSkull.class, DataWatcherRegistry.i);
@@ -34,11 +36,11 @@
@@ -35,11 +37,11 @@
Entity entity = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
if (this.shooter != null) {
@@ -22,7 +22,7 @@
}
}
} else {
@@ -55,14 +57,22 @@
@@ -56,14 +58,22 @@
}
if (b0 > 0) {
@@ -34,14 +34,14 @@
Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
- this.world.createExplosion(this, this.locX, this.locY, this.locZ, 1.0F, false, explosion_effect);
- this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), 1.0F, false, explosion_effect);
+ // CraftBukkit start
+ // this.world.createExplosion(this, this.locX, this.locY, this.locZ, 1.0F, false, explosion_effect);
+ // this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), 1.0F, false, explosion_effect);
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 1.0F, false);
+ this.world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), explosion_effect);
+ this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), event.getRadius(), event.getFire(), explosion_effect);
+ }
+ // CraftBukkit end
this.die();