From 47221671ba6360e6454bfa35e84bef58d7fdd9b6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Apr 2016 16:29:39 -0400
Subject: [PATCH] Configurable Grass Spread Tick Rate

Raise this value to make grass spread slower. Set to 0 to turn off grass spreading all together.
---
 ...-Configurable-Grass-Spread-Tick-Rate.patch | 36 +++++++++++++++++++
 paper                                         |  2 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 Spigot-Server-Patches/0125-Configurable-Grass-Spread-Tick-Rate.patch

diff --git a/Spigot-Server-Patches/0125-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0125-Configurable-Grass-Spread-Tick-Rate.patch
new file mode 100644
index 0000000000..be61c0d47f
--- /dev/null
+++ b/Spigot-Server-Patches/0125-Configurable-Grass-Spread-Tick-Rate.patch
@@ -0,0 +1,36 @@
+From 2a92f48361cd9f48917a02edd1f63ae860685c03 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 44a33ee..be21c0f 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+@@ -306,4 +306,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 8fc736d..b656994 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.8.0
+
diff --git a/paper b/paper
index 340acf43d9..fccd31448b 100755
--- a/paper
+++ b/paper
@@ -58,7 +58,7 @@ case "$1" in
         cd "$basedir/Paper-API"
     ;;
     "s" | "server")
-        cd "$basedir"
+        cd "$basedir/Paper-Server"
     ;;
     "e" | "edit")
         case "$2" in