From 572159a4fadf50e371db96afc197a1a09ba23e3a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 20 Mar 2013 11:48:17 -0400 Subject: [PATCH] Allow fishing success rate to be adjustable. Adds BUKKIT-3837 By: Andre LeBlanc --- .../src/main/java/org/bukkit/entity/Fish.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/entity/Fish.java b/paper-api/src/main/java/org/bukkit/entity/Fish.java index dca77fce6c..25e58b08c8 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Fish.java +++ b/paper-api/src/main/java/org/bukkit/entity/Fish.java @@ -3,4 +3,26 @@ package org.bukkit.entity; /** * Represents a fishing hook. */ -public interface Fish extends Projectile {} +public interface Fish extends Projectile { + + /** + * Gets the chance of a fish biting. + *

+ * 0.0 = No Chance.
+ * 1.0 = Instant catch. + * + * @return chance the bite chance + */ + public double getBiteChance(); + + /** + * Sets the chance of a fish biting. + *

+ * 0.0 = No Chance.
+ * 1.0 = Instant catch. + * + * @param chance the bite chance + * @throws IllegalArgumentException if the bite chance is not between 0 and 1 + */ + public void setBiteChance(double chance) throws IllegalArgumentException; +}