54 lines
2.5 KiB
Diff
54 lines
2.5 KiB
Diff
From 09f8cee06e5801c53557070287cd1de174212907 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
Date: Tue, 5 Aug 2014 16:26:30 -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 f55e53140..e2e41b9e6 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
|
@@ -20,7 +20,7 @@ public class BlockCactus extends Block {
|
|
;
|
|
}
|
|
|
|
- if (l < 3) {
|
|
+ if (l < world.paperSpigotConfig.cactusMaxHeight) { // PaperSpigot - Configurable max growth height for cactus blocks
|
|
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 6c04ad2b1..0fa33494b 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
|
@@ -21,7 +21,7 @@ public class BlockReed extends Block {
|
|
;
|
|
}
|
|
|
|
- if (l < 3) {
|
|
+ if (l < world.paperSpigotConfig.reedMaxHeight) { // PaperSpigot - Configurable max growth height for reed blocks
|
|
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/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index 5cda463b5..0878ea753 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -97,4 +97,13 @@ public class PaperSpigotWorldConfig
|
|
playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
|
|
log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
|
|
}
|
|
+
|
|
+ public int cactusMaxHeight;
|
|
+ public int reedMaxHeight;
|
|
+ private void blockGrowthHeight()
|
|
+ {
|
|
+ cactusMaxHeight = getInt( "max-growth-height.cactus", 3 );
|
|
+ reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
|
|
+ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
|
|
+ }
|
|
}
|
|
--
|
|
2.13.3
|
|
|