diff --git a/Changelog.txt b/Changelog.txt index f7aa1416c..11efa442f 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -14,6 +14,7 @@ Version 1.5.00-dev + 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 + + Added option to config.yml to override vanilla Minecraft treasures ! 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 79089c0d2..e8dccd821 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 getFishingOverrideTreasures() { return config.getBoolean("Skills.Fishing.Override_Vanilla_Treasures", true); } public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); } /* Mining */ diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index b065b8dcc..3ca2096e1 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -222,6 +222,13 @@ public class PlayerListener implements Listener { return; case CAUGHT_FISH: + //TODO Update to new API once available! Waiting for case CAUGHT_TREASURE: + Item fishingCatch = (Item) event.getCaught(); + + if (Config.getInstance().getFishingOverrideTreasures() && fishingCatch.getItemStack().getType() != Material.RAW_FISH) { + fishingCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1)); + } + if (Permissions.vanillaXpBoost(player, SkillType.FISHING)) { event.setExpToDrop(fishingManager.handleVanillaXpBoost(event.getExpToDrop())); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 5638014f4..d27b241a8 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -288,6 +288,7 @@ Skills: Fishing: Level_Cap: 0 Drops_Enabled: true + Override_Vanilla_Treasures: true # Always catch fish, even when treasure is found Extra_Fish: false Herbalism: