mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fix herbalism I think
This commit is contained in:
parent
2c8d2998bb
commit
8cbb57df97
@ -195,21 +195,31 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
public int getXp(SkillType skill, MaterialData data)
|
||||
{
|
||||
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
String explicitString = baseString + StringUtils.getFriendlyConfigMaterialDataString(data);
|
||||
String noDataString = baseString + StringUtils.getPrettyItemString(data.getItemType());
|
||||
String explicitString = baseString + StringUtils.getExplicitConfigMaterialDataString(data);
|
||||
if (config.contains(explicitString))
|
||||
return config.getInt(explicitString);
|
||||
return config.getInt(noDataString, 0);
|
||||
String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialDataString(data);
|
||||
if (config.contains(friendlyString))
|
||||
return config.getInt(friendlyString);
|
||||
String wildcardString = baseString + StringUtils.getWildcardConfigMaterialDataString(data);
|
||||
if (config.contains(wildcardString))
|
||||
return config.getInt(wildcardString);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isSkillBlock(SkillType skill, MaterialData data)
|
||||
{
|
||||
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
String explicitString = baseString + StringUtils.getFriendlyConfigMaterialDataString(data);
|
||||
String noDataString = baseString + StringUtils.getPrettyItemString(data.getItemType());
|
||||
String explicitString = baseString + StringUtils.getExplicitConfigMaterialDataString(data);
|
||||
if (config.contains(explicitString))
|
||||
return true;
|
||||
return config.contains(noDataString);
|
||||
String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialDataString(data);
|
||||
if (config.contains(friendlyString))
|
||||
return true;
|
||||
String wildcardString = baseString + StringUtils.getWildcardConfigMaterialDataString(data);
|
||||
if (config.contains(wildcardString))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Acrobatics */
|
||||
|
@ -48,6 +48,10 @@ public class StringUtils {
|
||||
return createPrettyEnumString(species.toString());
|
||||
}
|
||||
|
||||
public static String getWildcardConfigMaterialDataString(MaterialData data) {
|
||||
return StringUtils.getPrettyItemString(data.getItemType()).replace(" ", "_") + "|*";
|
||||
}
|
||||
|
||||
public static String getFriendlyConfigMaterialDataString(MaterialData data) {
|
||||
switch (data.getItemType()) {
|
||||
case LOG :
|
||||
|
@ -184,12 +184,6 @@ Experience:
|
||||
Water_Lily: 100
|
||||
White_Tulip: 150
|
||||
Yellow_Flower: 100
|
||||
Beetroot_Block_Ungrown: 0
|
||||
Carrot_Ungrown: 0
|
||||
Potato_Ungrown: 0
|
||||
Crops_Ungrown: 0
|
||||
Nether_Warts_Ungrown: 0
|
||||
Cocoa_Ungrown: 0
|
||||
Mining:
|
||||
Coal_Ore: 100
|
||||
Diamond_Ore: 750
|
||||
@ -208,8 +202,8 @@ Experience:
|
||||
Quartz_Ore: 100
|
||||
Redstone_Ore: 150
|
||||
Sandstone: 30
|
||||
Stained_Clay: 50
|
||||
Stone: 30
|
||||
Stained_Clay|*: 50
|
||||
Stone|*: 30
|
||||
Red_Sandstone: 100
|
||||
Prismarine: 70
|
||||
Purpur_Block: 200
|
||||
|
Loading…
Reference in New Issue
Block a user