From e8658be06e362eaaad09d04aefeeab0c4754cbad Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 28 Nov 2014 01:29:35 -0600 Subject: [PATCH] Configurable fishing time ranges diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index b1a6daf..e94c4c7 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -324,7 +324,8 @@ public class EntityFishingHook extends Entity { this.av = MathHelper.nextInt(this.random, 20, 80); } } else { - this.au = MathHelper.nextInt(this.random, 100, 900); + // PaperSpigot - Configurable fishing tick range + this.au = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); this.au -= EnchantmentManager.h(this.owner) * 20 * 5; } } diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java index 0878ea7..b67b856 100644 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -106,4 +106,12 @@ public class PaperSpigotWorldConfig reedMaxHeight = getInt( "max-growth-height.reeds", 3 ); log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight); } + + public int fishingMinTicks; + public int fishingMaxTicks; + private void fishingTickRange() + { + fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 ); + fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); + } } -- 1.9.1