3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0060-Disable-thunder.patch
Byteflux 4cd1afddde Various configurable toggles
- Disable explosion knockback for players
- Disable thunder logic
- Disable ice and snow formation
- Disable mood sounds
2015-07-14 09:34:10 -07:00

38 Zeilen
1.7 KiB
Diff

From 10aeb7030c8694ef21eeb286494dd8e2dcd274e1 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 59296d0..235f1c8 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 178f251..4ebd9dd 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -366,4 +366,10 @@ public class PaperSpigotWorldConfig
{
disableExplosionKnockback = getBoolean( "disable-explosion-knockback", false );
}
+
+ public boolean disableThunder;
+ private void disableThunder()
+ {
+ disableThunder = getBoolean( "disable-thunder", false );
+ }
}
--
1.9.5.msysgit.1