aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch
diff options
context:
space:
mode:
authorZach Brown <[email protected]>2017-04-29 05:27:31 -0500
committerZach Brown <[email protected]>2017-04-29 05:27:31 -0500
commit974b0afca91844fed61c5fda9293bbcd88752c2f (patch)
treed3a7b65e14f34b7cc8928efaf6403f67eaaaf708 /Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch
parent8b2122a291e3ea68f0e1516209914ef43a2d55e9 (diff)
downloadPaper-974b0afca91844fed61c5fda9293bbcd88752c2f.tar.gz
Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.zip
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue, switching to Mojang's implementation which doesn't appear to share it. I already removed the important bit in the last upstream merge, this is just unused and unnecessary now. So we remove it.
Diffstat (limited to 'Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch')
-rw-r--r--Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch
new file mode 100644
index 0000000000..38541c1730
--- /dev/null
+++ b/Spigot-Server-Patches/0104-Configurable-Grass-Spread-Tick-Rate.patch
@@ -0,0 +1,36 @@
+From 408594ec2da3c56bb04e5789c7fb2ccaa85dd7c2 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+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 2c682ccf7..74a49a5fb 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+@@ -278,4 +278,10 @@ public class PaperWorldConfig {
+ private void useInhabitedTime() {
+ useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
+ }
++
++ 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/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
+index 8b43e6070..5cbc95f7c 100644
+--- a/src/main/java/net/minecraft/server/BlockGrass.java
++++ b/src/main/java/net/minecraft/server/BlockGrass.java
+@@ -28,6 +28,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
+ }
+
+ public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
++ if (world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + blockposition.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper
+ if (!world.isClientSide) {
+ int lightLevel = -1; // Paper
+ if (world.getType(blockposition.up()).c() > 2 && (lightLevel = world.getLightLevel(blockposition.up())) < 4) { // Paper - move light check to end to avoid unneeded light lookups
+--
+2.12.2.windows.2
+