Fixed errors with block-based skill experience (#3506)

* Updated configs

* [WIP] Replacing MaterialData with Blockdata

* Fixed most block based experience gain

* Fixed most block based experience gain & updated wooden_tools

* Removed debug prints
This commit is contained in:
Shane Robertson
2018-07-26 18:53:29 -05:00
committed by t00thpick1
parent 210b418e44
commit ee324c77a9
29 changed files with 211 additions and 165 deletions

View File

@@ -20,14 +20,14 @@ public class Excavation {
* @return the list of treasures that could be found
*/
protected static List<ExcavationTreasure> getTreasures(BlockState blockState) {
String friendly = StringUtils.getFriendlyConfigMaterialDataString(blockState.getData());
String friendly = StringUtils.getFriendlyConfigBlockDataString(blockState.getBlockData());
if (TreasureConfig.getInstance().excavationMap.containsKey(friendly))
return TreasureConfig.getInstance().excavationMap.get(friendly);
return new ArrayList<ExcavationTreasure>();
}
protected static int getBlockXP(BlockState blockState) {
int xp = ExperienceConfig.getInstance().getXp(SkillType.EXCAVATION, blockState.getData());
int xp = ExperienceConfig.getInstance().getXp(SkillType.EXCAVATION, blockState.getBlockData());
if (xp == 0 && mcMMO.getModManager().isCustomExcavationBlock(blockState)) {
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();