diff --git a/CraftBukkit-Patches/0157-Configurable-cactus-and-reed-natural-growth-heights.patch b/CraftBukkit-Patches/0157-Configurable-cactus-and-reed-natural-growth-heights.patch new file mode 100644 index 0000000000..6b66bc1881 --- /dev/null +++ b/CraftBukkit-Patches/0157-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -0,0 +1,69 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Tue, 20 May 2014 20:17:36 -0500 +Subject: [PATCH] Configurable cactus and reed natural growth heights + + +diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/BlockCactus.java ++++ b/src/main/java/net/minecraft/server/BlockCactus.java +@@ -0,0 +0,0 @@ import java.util.Random; + + import org.bukkit.event.entity.EntityDamageByBlockEvent; // CraftBukkit + ++import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++ + public class BlockCactus extends Block { + + protected BlockCactus() { +@@ -0,0 +0,0 @@ public class BlockCactus extends Block { + ; + } + +- if (l < 3) { ++ if (l < SpigotWorldConfig.cactusMaxHeight) { // PaperSpigot - Configurable natural growth heights + int i1 = world.getData(i, j, k); + + if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot +diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/BlockReed.java ++++ b/src/main/java/net/minecraft/server/BlockReed.java +@@ -0,0 +0,0 @@ + package net.minecraft.server; + ++import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++ + import java.util.Random; + + public class BlockReed extends Block { +@@ -0,0 +0,0 @@ public class BlockReed extends Block { + ; + } + +- if (l < 3) { ++ if (l < SpigotWorldConfig.reedMaxHeight) { // PaperSpigot - Configurable natural growth heights + int i1 = world.getData(i, j, k); + + if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +0,0 @@ public class SpigotWorldConfig + squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); + } + ++ public static int cactusMaxHeight; ++ public static int reedMaxHeight; ++ private void blockGrowthHeight() ++ { ++ cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); ++ reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); ++ } ++ + public boolean randomLightUpdates; + private void lightUpdates() + { +-- \ No newline at end of file