mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Make the MagicHunter Chance configurable
This commit is contained in:
parent
88c39dbb72
commit
085a25306c
@ -68,7 +68,7 @@ public class AdvancedConfig extends ConfigLoader {
|
|||||||
|
|
||||||
/* FISHING */
|
/* FISHING */
|
||||||
public int getShakeUnlockLevel() { return config.getInt("Skills.Fishing.Shake_UnlockLevel", 150); }
|
public int getShakeUnlockLevel() { return config.getInt("Skills.Fishing.Shake_UnlockLevel", 150); }
|
||||||
public int getFishingEnchantmentChance() { return config.getInt("Skills.Fishing.Enchantment_Chance", 10); }
|
public int getFishingMagicMultiplier() { return config.getInt("Skills.Fishing.MagicHunter_Multiplier", 5); }
|
||||||
|
|
||||||
/* HERBALISM */
|
/* HERBALISM */
|
||||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.Food_RankChange", 200); }
|
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.Food_RankChange", 200); }
|
||||||
|
@ -151,6 +151,7 @@ public class Fishing {
|
|||||||
|
|
||||||
if (theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
if (theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||||
int lootTier = Fishing.getFishingLootTier(profile);
|
int lootTier = Fishing.getFishingLootTier(profile);
|
||||||
|
int magicHunterMultiplier = advancedConfig.getFishingMagicMultiplier();
|
||||||
int specificChance = 1;
|
int specificChance = 1;
|
||||||
boolean enchanted = false;
|
boolean enchanted = false;
|
||||||
ItemStack fishingResults = theCatch.getItemStack();
|
ItemStack fishingResults = theCatch.getItemStack();
|
||||||
@ -171,7 +172,7 @@ public class Fishing {
|
|||||||
* 20% - Tier 4
|
* 20% - Tier 4
|
||||||
* 25% - Tier 5
|
* 25% - Tier 5
|
||||||
*/
|
*/
|
||||||
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * 5) && Permissions.fishingMagic(player)) {
|
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * magicHunterMultiplier) && Permissions.fishingMagic(player)) {
|
||||||
for (Enchantment newEnchant : Enchantment.values()) {
|
for (Enchantment newEnchant : Enchantment.values()) {
|
||||||
if (newEnchant.canEnchantItem(fishingResults)) {
|
if (newEnchant.canEnchantItem(fishingResults)) {
|
||||||
specificChance++;
|
specificChance++;
|
||||||
|
@ -97,8 +97,8 @@ Skills:
|
|||||||
# Shake_UnlockLevel: Fishing level when the Shake ability unlocks
|
# Shake_UnlockLevel: Fishing level when the Shake ability unlocks
|
||||||
Shake_UnlockLevel: 150
|
Shake_UnlockLevel: 150
|
||||||
|
|
||||||
# Enchantment_Chance: Chance of getting fishing treasure with enchantments
|
# MagicHunter_Multiplier: Determines the chance of fishing enchanted items. The chance is calculated by getting the fishing TreasureHunt tier and multiplying it with MagicHunter_Multiplier
|
||||||
Enchantment_Chance: 10
|
MagicHunter_Multiplier: 5
|
||||||
#
|
#
|
||||||
# Settings for Herbalism
|
# Settings for Herbalism
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user