diff options
author | Andre LeBlanc <andre@norcode.com> | 2013-03-20 11:48:35 -0400 |
---|---|---|
committer | GJ <gjmcferrin@gmail.com> | 2013-03-25 14:45:24 -0400 |
commit | 18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835 (patch) | |
tree | cdc0953ab3b6a0ce43c19338df8484c77bde5071 /src/main/java/net/minecraft/server/EntityFishingHook.java | |
parent | 96ba65d506641ef37fbefc5f9a6c65a4ccec5d23 (diff) | |
download | craftbukkit-18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835.tar craftbukkit-18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835.tar.gz craftbukkit-18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835.tar.lz craftbukkit-18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835.tar.xz craftbukkit-18d7bc7ca3ff8fa5a183b9bb6bbab8ae388a8835.zip |
Allow fishing success rate to be adjustable. Adds BUKKIT-3837
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFishingHook.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFishingHook.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index 7a630116..b35a5d65 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -234,13 +234,7 @@ public class EntityFishingHook extends Entity { if (this.au > 0) { --this.au; } else { - short short1 = 500; - - if (this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY) + 1, MathHelper.floor(this.locZ))) { - short1 = 300; - } - - if (this.random.nextInt(short1) == 0) { + if (random.nextDouble() < ((org.bukkit.entity.Fish) this.getBukkitEntity()).getBiteChance()) { // CraftBukkit - moved logic to CraftFish this.au = this.random.nextInt(30) + 10; this.motY -= 0.20000000298023224D; this.makeSound("random.splash", 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); |