From a9f800ac688307deeee350a15a8c92f2522a9eb2 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 15 Feb 2014 11:43:54 +0100 Subject: [PATCH] Add option to drop extra fish Allows enabling of old fishing mechanic where fish was always caught, even when a treasure was found --- Changelog.txt | 2 ++ src/main/java/com/gmail/nossr50/config/Config.java | 1 + .../java/com/gmail/nossr50/skills/fishing/FishingManager.java | 4 ++++ src/main/resources/config.yml | 4 +++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 20338218e..461716397 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -7,6 +7,8 @@ Key: ! Change - Removal +Version 1.5.00-dev + Version 1.4.08 + Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this! + Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 644f3698a..d9ab2c384 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -451,6 +451,7 @@ public class Config extends AutoUpdateConfigLoader { /* Fishing */ public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); } + public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); } /* Mining */ public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); } diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 1df238c01..da16fcaa2 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -347,6 +347,10 @@ public class FishingManager extends SkillManager { player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicFound")); } + if (Config.getInstance().getFishingExtraFish()) { + Misc.dropItem(player.getEyeLocation(), fishingCatch.getItemStack()); + } + fishingCatch.setItemStack(treasureDrop); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 976c59a14..9e1464405 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -287,8 +287,10 @@ Skills: Excavation: Level_Cap: 0 Fishing: - Drops_Enabled: true Level_Cap: 0 + Drops_Enabled: true + # Always catch fish, even when treasure is found + Extra_Fish: false Herbalism: Level_Cap: 0 Prevent_AFK_Leveling: true