mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
@@ -15,7 +15,7 @@
|
||||
|
||||
public EntityTNTPrimed(World world) {
|
||||
super(world);
|
||||
@@ -57,10 +61,13 @@
|
||||
@@ -60,10 +64,13 @@
|
||||
|
||||
--this.c;
|
||||
if (this.c <= 0) {
|
||||
@@ -28,9 +28,9 @@
|
||||
+ this.die();
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
this.aj();
|
||||
this.ak();
|
||||
this.world.addParticle(EnumParticle.SMOKE_NORMAL, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
@@ -69,9 +76,18 @@
|
||||
@@ -72,9 +79,18 @@
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -38,14 +38,14 @@
|
||||
+ // CraftBukkit start
|
||||
+ // float f = 4.0F;
|
||||
|
||||
- this.world.explode(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, f, true);
|
||||
- this.world.explode(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, 4.0F, true);
|
||||
+ org.bukkit.craftbukkit.CraftServer server = this.world.getServer();
|
||||
+
|
||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(server, this));
|
||||
+ server.getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
|
||||
+ this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, event.getRadius(), event.getFire(), true);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
Reference in New Issue
Block a user