Check 0 first.

This commit is contained in:
GJ 2013-10-09 10:26:51 -04:00
parent 9485869014
commit 8a2c5fb051

View File

@ -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;
} }