2015-09-13 02:57:39 +02:00
|
|
|
From ab30baecc311d8f631b78608037e2bf04ab84db2 Mon Sep 17 00:00:00 2001
|
2015-08-05 02:47:57 +02:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
|
|
|
Date: Tue, 4 Aug 2015 17:45:00 -0700
|
|
|
|
Subject: [PATCH] Configurable TNT explosion volume
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
2015-09-02 03:14:41 +02:00
|
|
|
index a60d3dd..b7d410e 100644
|
2015-08-05 02:47:57 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
2015-09-02 03:14:41 +02:00
|
|
|
@@ -164,7 +164,10 @@ public class Explosion {
|
2015-08-05 02:47:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void a(boolean flag) {
|
|
|
|
- this.world.makeSound(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.world.random.nextFloat() - this.world.random.nextFloat()) * 0.2F) * 0.7F);
|
|
|
|
+ // PaperSpigot start - Configurable TNT explosion volume.
|
|
|
|
+ float volume = source instanceof EntityTNTPrimed ? world.paperSpigotConfig.tntExplosionVolume : 4.0F;
|
|
|
|
+ this.world.makeSound(this.posX, this.posY, this.posZ, "random.explode", volume, (1.0F + (this.world.random.nextFloat() - this.world.random.nextFloat()) * 0.2F) * 0.7F);
|
|
|
|
+ // PaperSpigot end
|
|
|
|
if (this.size >= 2.0F && this.b) {
|
|
|
|
this.world.addParticle(EnumParticle.EXPLOSION_HUGE, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D, new int[0]);
|
|
|
|
} else {
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-09-02 03:14:41 +02:00
|
|
|
index 84cdb12..3f8bffc 100644
|
2015-08-05 02:47:57 +02:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -402,4 +402,10 @@ public class PaperSpigotWorldConfig
|
|
|
|
{
|
2015-08-05 02:57:17 +02:00
|
|
|
containerUpdateTickRate = getInt( "container-update-tick-rate", 1 );
|
2015-08-05 02:47:57 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public float tntExplosionVolume;
|
|
|
|
+ private void tntExplosionVolume()
|
|
|
|
+ {
|
2015-08-05 02:57:17 +02:00
|
|
|
+ tntExplosionVolume = getFloat( "tnt-explosion-volume", 4.0F );
|
2015-08-05 02:47:57 +02:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-09-02 03:14:41 +02:00
|
|
|
2.5.1
|
2015-08-05 02:47:57 +02:00
|
|
|
|