mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Check 0 first.
This commit is contained in:
parent
9485869014
commit
8a2c5fb051
@ -26,11 +26,13 @@ public class Mining {
|
||||
Material blockType = blockState.getType();
|
||||
int xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, blockType);
|
||||
|
||||
if (blockType == Material.GLOWING_REDSTONE_ORE) {
|
||||
xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, Material.REDSTONE_ORE);
|
||||
}
|
||||
else if (xp == 0 && ModUtils.isCustomMiningBlock(blockState)) {
|
||||
xp = ModUtils.getCustomBlock(blockState).getXpGain();
|
||||
if (xp == 0) {
|
||||
if (blockType == Material.GLOWING_REDSTONE_ORE) {
|
||||
xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, Material.REDSTONE_ORE);
|
||||
}
|
||||
else if (ModUtils.isCustomMiningBlock(blockState)) {
|
||||
xp = ModUtils.getCustomBlock(blockState).getXpGain();
|
||||
}
|
||||
}
|
||||
|
||||
return xp;
|
||||
|
Loading…
Reference in New Issue
Block a user