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