testserver/patches/server/0036-Disable-thunder.patch

34 lines
2.0 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 1d91adcfa636455bf67c6f7ac7d51baaa6db047f..a591d52ed44213d7932690136796d3e068b06987 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -222,4 +222,9 @@ public class PaperWorldConfig {
2021-06-11 12:02:28 +00:00
private void disableExplosionKnockback(){
disableExplosionKnockback = getBoolean("disable-explosion-knockback", false);
}
+
+ public boolean disableThunder;
+ private void disableThunder() {
+ disableThunder = getBoolean("disable-thunder", false);
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
2022-06-07 19:15:06 +00:00
index 53213d0c2d1b402f28a2da315d18c46deba509bf..94a796143e25a0e8914158efed4ce01a440f3bcc 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
2022-06-07 19:15:06 +00:00
@@ -579,7 +579,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
2021-06-11 12:02:28 +00:00
gameprofilerfiller.push("thunder");
BlockPos blockposition;
- if (flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot
+ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder
2021-06-12 00:57:04 +00:00
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
2021-06-11 12:02:28 +00:00
if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);