geforkt von Mirrors/Paper
a2ad49b22f
Note to other developers: This commit may require you to wipe your workspace as a result of the changes to BD. --- work/BuildData Submodule work/BuildData f527a8ff..d56672db: > Mappings Update --- work/Bukkit Submodule work/Bukkit 0c1d258bb..db06c80d7: > Add list of entities to EntityTransformEvent > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks ---work/CraftBukkit Submodule work/CraftBukkit 6a398ac44..068dab5be: > Enable optional source JAR shading via profile shadeSourcesJar > Use ImmutableList rather than AbstractList for CraftMetaBook > Fix setRecipes(List) not setting Knowledge Book recipes. > Mappings Update > Add list of entities to EntityTransformEvent & move die calls > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks > Add Vanilla help to default permissions --- work/Spigot Submodule work/Spigot a1f2566f6..e769fe4d9: > Mappings Update > Rebuild patches
54 Zeilen
2.5 KiB
Diff
54 Zeilen
2.5 KiB
Diff
From a33afed850b70f0bb7a2da14d0ea528dad769f8a Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Tue, 1 Mar 2016 13:02:51 -0600
|
|
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index a73865739..098bd3fba 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -64,4 +64,13 @@ public class PaperWorldConfig {
|
|
config.addDefault("world-settings.default." + path, def);
|
|
return config.getString("world-settings." + worldName + "." + path, config.getString("world-settings.default." + path));
|
|
}
|
|
+
|
|
+ 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);
|
|
+
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
|
index 27758bd01..918db3626 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
|
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
|
|
;
|
|
}
|
|
|
|
- if (i < 3) {
|
|
+ if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
|
|
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
|
|
|
if (j >= (byte) range(3, ((100.0F / 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 fad1a0a83..c7017c58e 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
|
@@ -25,7 +25,7 @@ public class BlockReed extends Block {
|
|
;
|
|
}
|
|
|
|
- if (i < 3) {
|
|
+ if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height
|
|
int j = (Integer) iblockdata.get(BlockReed.AGE);
|
|
|
|
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
|
|
--
|
|
2.19.2
|
|
|