Add option to drop extra fish

Allows enabling of old fishing mechanic where fish was always caught,
even when a treasure was found
This commit is contained in:
TfT_02 2014-02-15 11:43:54 +01:00
parent da5e770e06
commit 91da5c4ab1
4 changed files with 9 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Version 1.5.00-dev
+ Added Acacia and Dark Oak to Woodcutting blocks + Added Acacia and Dark Oak to Woodcutting blocks
+ Added Salmon, Clownfish, and Pufferfish to Fishing XP + Added Salmon, Clownfish, and Pufferfish to Fishing XP
+ Added new flowers and grasses to Herbalism 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. ! 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. ! 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. ! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly.

View File

@ -452,6 +452,7 @@ public class Config extends AutoUpdateConfigLoader {
/* Fishing */ /* Fishing */
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); } public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
/* Mining */ /* Mining */
public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); } public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); }

View File

@ -342,6 +342,10 @@ public class FishingManager extends SkillManager {
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicFound")); player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicFound"));
} }
if (Config.getInstance().getFishingExtraFish()) {
Misc.dropItem(player.getEyeLocation(), fishingCatch.getItemStack());
}
fishingCatch.setItemStack(treasureDrop); fishingCatch.setItemStack(treasureDrop);
} }
} }

View File

@ -287,8 +287,10 @@ Skills:
Excavation: Excavation:
Level_Cap: 0 Level_Cap: 0
Fishing: Fishing:
Drops_Enabled: true
Level_Cap: 0 Level_Cap: 0
Drops_Enabled: true
# Always catch fish, even when treasure is found
Extra_Fish: false
Herbalism: Herbalism:
Level_Cap: 0 Level_Cap: 0
Prevent_AFK_Leveling: true Prevent_AFK_Leveling: true