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
|
2021-11-24 18:58:26 +01:00
|
|
|
index 5cae4a5caf9aba8c0e99f1cb6badc5e8374862c8..1a9b4b08ea906adbfa25c3963a4634871d7ca2f6 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-11-24 18:58:26 +01:00
|
|
|
@@ -212,4 +212,9 @@ public class PaperWorldConfig {
|
2021-06-11 14:02:28 +02: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-03-01 06:43:03 +01:00
|
|
|
index a377639517c5777e46e9a5cdbdc94b5b6a99eaa4..59dccc9b33452f6692cddf39056b2640529d2d28 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
|
2022-03-01 06:43:03 +01:00
|
|
|
@@ -561,7 +561,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
2021-06-11 14:02:28 +02:00
|
|
|
gameprofilerfiller.push("thunder");
|
|
|
|
BlockPos blockposition;
|
|
|
|
|
2021-10-24 19:38:23 +02:00
|
|
|
- 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 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);
|