mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Minor cleanup
This commit is contained in:
parent
57e33bbf39
commit
1633617006
@ -77,7 +77,7 @@ public class HerbalismManager extends SkillManager {
|
|||||||
* @return the modified change in hunger for the event
|
* @return the modified change in hunger for the event
|
||||||
*/
|
*/
|
||||||
public int farmersDiet(int rankChange, int eventFoodLevel) {
|
public int farmersDiet(int rankChange, int eventFoodLevel) {
|
||||||
return SkillUtils.handleFoodSkills(getPlayer(), SkillType.HERBALISM, eventFoodLevel, Herbalism.farmersDietRankLevel1, Herbalism.farmersDietMaxLevel, rankChange);
|
return SkillUtils.handleFoodSkills(getPlayer(), skill, eventFoodLevel, Herbalism.farmersDietRankLevel1, Herbalism.farmersDietMaxLevel, rankChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -342,6 +342,6 @@ public class HerbalismManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private byte getGreenThumbStage() {
|
private byte getGreenThumbStage() {
|
||||||
return (byte) Math.min(Math.min(getProfile().getSkillLevel(SkillType.HERBALISM), Herbalism.greenThumbStageMaxLevel) / Herbalism.greenThumbStageChangeLevel, 4);
|
return (byte) Math.min(Math.min(getProfile().getSkillLevel(skill), Herbalism.greenThumbStageMaxLevel) / Herbalism.greenThumbStageChangeLevel, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,9 +66,11 @@ public class MiningManager extends SkillManager{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean skillTouch = player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||||
|
|
||||||
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
|
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
|
||||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Mining.doubleDropsMaxChance, Mining.doubleDropsMaxLevel)) {
|
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Mining.doubleDropsMaxChance, Mining.doubleDropsMaxLevel)) {
|
||||||
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
if (skillTouch) {
|
||||||
Mining.handleSilkTouchDrops(blockState);
|
Mining.handleSilkTouchDrops(blockState);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user