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