mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Added option to advanced.yml to determine the # of enchant levels used
when buffing Super Breaker & Giga Drill Breaker
This commit is contained in:
parent
a9438ed52b
commit
3219674678
@ -8,6 +8,7 @@ Key:
|
||||
- Removal
|
||||
|
||||
Version 1.4.03-dev
|
||||
+ Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker
|
||||
= Fixed bug where players were unable to salvage leather armor
|
||||
= Fixed bug with repairing using materials with byte metadata
|
||||
= Fixed bug where Fishing was becoming less successful at higher levels
|
||||
|
@ -20,6 +20,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
/* GENERAL */
|
||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability_IncreaseLevel", 50); }
|
||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability_EnchantBuff", 5); }
|
||||
|
||||
/* ACROBATICS */
|
||||
public double getDodgeChanceMax() { return config.getDouble("Skills.Acrobatics.Dodge_ChanceMax", 20.0D); }
|
||||
|
@ -40,6 +40,8 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.spout.SpoutUtils;
|
||||
|
||||
public class SkillUtils {
|
||||
private static int enchantBuff = AdvancedConfig.getInstance().getEnchantBuff();
|
||||
|
||||
public static int handleFoodSkills(Player player, SkillType skill, int eventFoodLevel, int baseLevel, int maxLevel, int rankChange) {
|
||||
int skillLevel = UserManager.getPlayer(player).getProfile().getSkillLevel(skill);
|
||||
|
||||
@ -477,7 +479,7 @@ public class SkillUtils {
|
||||
}
|
||||
|
||||
itemLore.add("mcMMO Ability Tool");
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel + 5, true);
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel + enchantBuff, true);
|
||||
|
||||
itemMeta.setLore(itemLore);
|
||||
heldItem.setItemMeta(itemMeta);
|
||||
@ -543,11 +545,11 @@ public class SkillUtils {
|
||||
if (itemLore.remove("mcMMO Ability Tool")) {
|
||||
int efficiencyLevel = item.getEnchantmentLevel(Enchantment.DIG_SPEED);
|
||||
|
||||
if (efficiencyLevel <= 5) {
|
||||
if (efficiencyLevel <= enchantBuff) {
|
||||
itemMeta.removeEnchant(Enchantment.DIG_SPEED);
|
||||
}
|
||||
else {
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - 5, true);
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - enchantBuff, true);
|
||||
}
|
||||
|
||||
itemMeta.setLore(itemLore);
|
||||
|
@ -16,6 +16,8 @@ Skills:
|
||||
General:
|
||||
# This setting will determine when the length of every ability gets longer with 1 second
|
||||
Ability_IncreaseLevel: 50
|
||||
# This setting determines how many enchant levels to use when buffing Super Breaker & Giga Drill Breaker
|
||||
Ability_EnchantBuff: 5
|
||||
#
|
||||
# Settings for Acrobatics
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user