testserver/Spigot-Server-Patches/0012-Configurable-fishing-t...

40 lines
1.9 KiB
Diff
Raw Normal View History

From 3411a63f46a535c76039274fc976b2c6eee6fd8b Mon Sep 17 00:00:00 2001
2015-01-29 21:25:50 +00:00
From: Zach Brown <zach.brown@destroystokyo.com>
2015-03-08 01:16:09 +00:00
Date: Sat, 7 Mar 2015 21:00:13 -0600
2014-06-29 18:33:49 +00:00
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
2015-03-08 01:16:09 +00:00
index c2bfb1f..28d698d 100644
2014-06-29 18:33:49 +00:00
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
2015-03-08 01:16:09 +00:00
@@ -331,7 +331,7 @@ public class EntityFishingHook extends Entity {
this.ax = MathHelper.nextInt(this.random, 20, 80);
2014-06-29 18:33:49 +00:00
}
} else {
2015-03-08 01:16:09 +00:00
- this.aw = MathHelper.nextInt(this.random, 100, 900);
+ this.aw = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); // PaperSpigot - Configurable fishing tick range
this.aw -= EnchantmentManager.h(this.owner) * 20 * 5;
2014-06-29 18:33:49 +00:00
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 014b8d9..b7afd3e 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-11-28 01:17:45 +00:00
@@ -106,4 +106,12 @@ public class PaperSpigotWorldConfig
reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
2015-03-08 01:16:09 +00:00
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight );
2014-06-29 18:33:49 +00:00
}
+
2014-08-05 23:45:22 +00:00
+ public int fishingMinTicks;
+ public int fishingMaxTicks;
+ private void fishingTickRange()
2014-06-29 18:33:49 +00:00
+ {
2014-08-05 23:45:22 +00:00
+ fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 );
+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
2014-06-29 18:33:49 +00:00
+ }
}
2014-06-29 18:33:49 +00:00
--
2015-03-08 01:16:09 +00:00
1.9.1
2014-06-29 18:33:49 +00:00