Skip to content

Commit

Permalink
Coral Plants & Blue Ice now give XP
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Jan 15, 2019
1 parent f15f25a commit 4e1f535
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Version 2.1.0
+ Added links to mcMMO related websites to various commands
+ Certain elements of mcMMO's UI have been restyled
+ Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out
+ (Experience) Coral (plants) now give Herbalism XP
+ (Experience) Blue Ice now gives Mining XP
+ (Experience) Drowned mobs now count towards combat XP
+ (Experience) You can now set guaranteed minimum values for XP gained if diminishing returns are enabled, this value defaults to 5% (experience.yml)
+ (Events) Starting an XP event will now use the title API (toggle this in advanced.yml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public int getXp(PrimarySkillType skill, BlockData data)
return 0;
}

public boolean isSkillBlock(PrimarySkillType skill, Material data)
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data)
{
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
Expand All @@ -232,7 +232,7 @@ public boolean isSkillBlock(PrimarySkillType skill, Material data)
return config.contains(wildcardString);
}

public boolean isSkillBlock(PrimarySkillType skill, BlockData data)
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, BlockData data)
{
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/gmail/nossr50/util/BlockUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static boolean canMakeMossy(BlockState blockState) {
* @return true if the block should affected by Green Terra, false otherwise
*/
public static boolean affectedByGreenTerra(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.HERBALISM, blockState.getBlockData())) {
if (ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.HERBALISM, blockState.getBlockData())) {
return true;
}

Expand All @@ -188,7 +188,7 @@ public static boolean affectedByGreenTerra(BlockState blockState) {
* otherwise
*/
public static Boolean affectedBySuperBreaker(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.MINING, blockState.getBlockData()))
if (ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.MINING, blockState.getBlockData()))
return true;

return isOre(blockState) || mcMMO.getModManager().isCustomMiningBlock(blockState);
Expand All @@ -203,7 +203,7 @@ public static Boolean affectedBySuperBreaker(BlockState blockState) {
* otherwise
*/
public static boolean affectedByGigaDrillBreaker(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.EXCAVATION, blockState.getBlockData()))
if (ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.EXCAVATION, blockState.getBlockData()))
return true;
return mcMMO.getModManager().isCustomExcavationBlock(blockState);
}
Expand All @@ -216,7 +216,7 @@ public static boolean affectedByGigaDrillBreaker(BlockState blockState) {
* @return true if the block is a log, false otherwise
*/
public static boolean isLog(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.WOODCUTTING, blockState.getBlockData()))
if (ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.WOODCUTTING, blockState.getBlockData()))
return true;
return mcMMO.getModManager().isCustomLog(blockState);
}
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ Experience:
Red_Mushroom_Block: 70
Brown_Mushroom_Block: 70
Herbalism:
Tube_Coral_Fan: 80
Brain_Coral: 90
Bubble_Coral: 75
Fire_Coral: 120
Horn_Coral: 175
Dead_Tube_Coral: 30
Dead_Brain_Coral: 30
Dead_Bubble_Coral: 30
Dead_Fire_Coral: 30
Dead_Horn_Coral: 30
Allium: 300
Azure_Bluet: 150
Beetroots_Ripe: 50
Expand Down Expand Up @@ -211,6 +221,7 @@ Experience:
Netherrack: 30
Obsidian: 150
Packed_Ice: 50
Blue_Ice: 100
Nether_Quartz_Ore: 100
Redstone_Ore: 150
Sandstone: 30
Expand Down

0 comments on commit 4e1f535

Please sign in to comment.