Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
19b4f78b55
Replaces the "use-chunk-inhabited-timer" config option with the options "use-fixed-chunk-inhabited-time" and "fixed-chunk-inhabited-time". When using "use-fixed-chunk-inhabited-time=false" everything will be the same like it was with "use-chunk-inhabited-timer=true". When using "use-fixed-chunk-inhabited-time=true" and "fixed-chunk-inhabited-time=0" everything will be the same like it was with "use-chunk-inhabited-timer=false". Instead of just using 0 when all chunks should be treated equally this allows to fine-tune vanilla gameplay.
37 Zeilen
1.7 KiB
Diff
37 Zeilen
1.7 KiB
Diff
From 272d84b1e4ba0f99f9573a7ab3c8123f8d3ab2bb Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sun, 3 Apr 2016 16:28:17 -0400
|
|
Subject: [PATCH] Configurable Grass Spread Tick Rate
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index d2559f7c4..058cd8cc8 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -243,4 +243,10 @@ public class PaperWorldConfig {
|
|
}
|
|
fixedInhabitedTime = getInt("fixed-chunk-inhabited-time", -1);
|
|
}
|
|
+
|
|
+ public int grassUpdateRate = 1;
|
|
+ private void grassUpdateRate() {
|
|
+ grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate));
|
|
+ log("Grass Spread Tick Rate: " + grassUpdateRate);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
index da6182deb..f1174825c 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
@@ -21,6 +21,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
|
}
|
|
|
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
|
+ if (this instanceof BlockGrass && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + blockposition.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper
|
|
if (!world.isClientSide) {
|
|
if (!a((IWorldReader) world, blockposition)) {
|
|
// CraftBukkit start
|
|
--
|
|
2.20.0
|
|
|