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

34 lines
1.9 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
2021-06-12 02:57:04 +02:00
index d26e8803222276fb7bb1bedd9fd13a8861ce671c..4792280988ac13593d59f6a10fa111eafa08328f 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
2021-06-12 02:57:04 +02:00
@@ -592,7 +592,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
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);