From 4e1f535fe2554343041406154ace80249ddb8996 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 15 Jan 2019 04:36:35 -0800 Subject: [PATCH] Coral Plants & Blue Ice now give XP --- Changelog.txt | 2 ++ .../nossr50/config/experience/ExperienceConfig.java | 4 ++-- src/main/java/com/gmail/nossr50/util/BlockUtils.java | 8 ++++---- src/main/resources/experience.yml | 11 +++++++++++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 3f88c55b0..65231e6fc 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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) diff --git a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java index 6d5a1582c..e5256ef59 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -219,7 +219,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader { 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); @@ -232,7 +232,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader { 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); diff --git a/src/main/java/com/gmail/nossr50/util/BlockUtils.java b/src/main/java/com/gmail/nossr50/util/BlockUtils.java index 3f56b69c3..557df34e3 100644 --- a/src/main/java/com/gmail/nossr50/util/BlockUtils.java +++ b/src/main/java/com/gmail/nossr50/util/BlockUtils.java @@ -172,7 +172,7 @@ public final class BlockUtils { * @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; } @@ -188,7 +188,7 @@ public final class BlockUtils { * 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); @@ -203,7 +203,7 @@ public final class BlockUtils { * 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); } @@ -216,7 +216,7 @@ public final class BlockUtils { * @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); } diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index cb4ae0e69..7edab543b 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -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 @@ -211,6 +221,7 @@ Experience: Netherrack: 30 Obsidian: 150 Packed_Ice: 50 + Blue_Ice: 100 Nether_Quartz_Ore: 100 Redstone_Ore: 150 Sandstone: 30