Paper/patches/server/0037-Disable-ice-and-snow.patch

34 lines
1.8 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: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 5019413dc5973dcc8fe0f1381ba2463862499b88..38b8b7bd59381c13a919c9b2e125d804be9b6e89 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
@@ -222,4 +222,9 @@ public class PaperWorldConfig {
2021-06-11 14:02:28 +02:00
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
2022-03-30 22:28:38 +02:00
index 9383ba7a6bc91fa73a235e3d94de8a5332ba2924..e330fc198705ff2a4d8503f8710e6424afc9fbbf 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
@@ -585,7 +585,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
2021-06-11 14:02:28 +02:00
}
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();
2022-03-01 06:43:03 +01:00
Biome biomebase = (Biome) this.getBiome(blockposition).value();