From 19461da8152c27d342d2a77a3857a1a1d22939b3 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 | 1 + 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, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 95d5c481a..d46e6a7d2 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -13,6 +13,7 @@ Version 1.5.00-dev + Added Acacia and Dark Oak to Woodcutting blocks + Added Salmon, Clownfish, and Pufferfish to Fishing XP + Added new flowers and grasses to Herbalism XP + + Added option to config.yml which allows players to always catch fish, even when a treasure is found ! Fishing XP now depends on the type of fish. ! Woodcutting XP in experience.yml and Woodcutting double drops in config.yml now use the tree species names. Oak is now Generic, and Spruce is now Redwood. ! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly. diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 7bb61d145..79089c0d2 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -432,6 +432,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 9aad1e86f..1f7033694 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -342,6 +342,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 858745fec..5638014f4 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -286,8 +286,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