mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Configurable TNT explosion volume
This commit is contained in:
parent
c92053d8b0
commit
febaf3c5a1
@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -0,0 +0,0 @@ public class Explosion {
|
||||
}
|
||||
|
||||
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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
|
||||
{
|
||||
containerUpdateTickRate = getInt("container-update-tick-rate", 1);
|
||||
}
|
||||
+
|
||||
+ public float tntExplosionVolume;
|
||||
+ private void tntExplosionVolume()
|
||||
+ {
|
||||
+ tntExplosionVolume = getFloat("tnt-explosion-volume", 4.0F);
|
||||
+ }
|
||||
}
|
||||
--
|
@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public int containerUpdateTickRate;
|
||||
+ private void containerUpdateTickRate()
|
||||
+ {
|
||||
+ containerUpdateTickRate = getInt("container-update-tick-rate", 1);
|
||||
+ containerUpdateTickRate = getInt( "container-update-tick-rate", 1 );
|
||||
+ }
|
||||
}
|
||||
--
|
Loading…
Reference in New Issue
Block a user