aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0038-Disable-ice-and-snow.patch
blob: 5a6d654b2441f8d0ce308cb53355eafb308e7a08 (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
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow


diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 1a9b4b08ea906adbfa25c3963a4634871d7ca2f6..ceb1602afb90fc0a23d6cc8d22fc85fab3b8da14 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -217,4 +217,9 @@ public class PaperWorldConfig {
     private void disableThunder() {
         disableThunder = getBoolean("disable-thunder", false);
     }
+
+    public boolean disableIceAndSnow;
+    private void disableIceAndSnow(){
+        disableIceAndSnow = getBoolean("disable-ice-and-snow", false);
+    }
 }
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index b8942266379e5e513b1a814906db3b7f96c4284f..5c6ba29dfd786098528d7e118c3059c9d75a9c42 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -585,7 +585,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
         }
 
         gameprofilerfiller.popPush("iceandsnow");
-        if (this.random.nextInt(16) == 0) {
+        if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
             blockposition = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.getBlockRandomPos(j, 0, k, 15));
             BlockPos blockposition1 = blockposition.below();
             Biome biomebase = (Biome) this.getBiome(blockposition).value();