Update configurations and skill block checks to be more configurable.

This commit is contained in:
t00thpick1
2017-06-10 13:47:20 -04:00
parent 5c267663a2
commit 15436b44da
11 changed files with 475 additions and 471 deletions

View File

@@ -18,8 +18,7 @@ public class Mining {
* @param blockState The {@link BlockState} to check ability activation for
*/
public static int getBlockXp(BlockState blockState) {
Material blockType = blockState.getType();
int xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, blockType != Material.GLOWING_REDSTONE_ORE ? blockType : Material.REDSTONE_ORE);
int xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, blockState.getData());
if (xp == 0 && mcMMO.getModManager().isCustomMiningBlock(blockState)) {
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();