Paper/patches/server/0034-Disable-thunder.patch

34 lines
1.8 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02: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 2222c1bb5f8625eee4d88946e4bfdfa2fe598977..083e421f8496b5336af473b108498ed28b984774 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -166,4 +166,9 @@ public class PaperWorldConfig {
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
index d721d05841d9557583045ab3adc347c24a6d751d..2176d1db94de2a608deadf0cd3e95c3c9ffac019 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -553,7 +553,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
2021-06-11 14:02:28 +02:00
gameprofilerfiller.push("thunder");
BlockPos blockposition;
- if (flag && this.isThundering() && this.random.nextInt(100000) == 0) {
+ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
2021-06-12 02:57:04 +02:00
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
2021-06-11 14:02:28 +02:00
if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);