aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0056-Disable-thunder.patch
blob: c47d58fb2356353652cca4cb78f9fc6cd9394918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 1fac37952e90156a79e01dc1ae40d02b31c7fd6c Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Tue, 14 Jul 2015 09:26:41 -0700
Subject: [PATCH] Disable thunder


diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9829ff0..6cf3157 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -422,7 +422,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
                 int i1;
                 BlockPosition blockposition;
 
-                if (this.random.nextInt(100000) == 0 && this.S() && this.R()) {
+                if (!this.paperSpigotConfig.disableThunder && this.random.nextInt(100000) == 0 && this.S() && this.R()) { // PaperSpigot - Disable thunder
                     this.m = this.m * 3 + 1013904223;
                     i1 = this.m >> 2;
                     blockposition = this.a(new BlockPosition(k + (i1 & 15), 0, l + (i1 >> 8 & 15)));
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index eaf1eda..a29f042 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -334,4 +334,10 @@ public class PaperSpigotWorldConfig
     {
         disableExplosionKnockback = getBoolean( "disable-explosion-knockback", false );
     }
+
+    public boolean disableThunder;
+    private void disableThunder()
+    {
+        disableThunder = getBoolean( "disable-thunder", false );
+    }
 }
-- 
2.7.0