mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Coral Plants & Blue Ice now give XP
This commit is contained in:
parent
f15f25a3df
commit
4e1f535fe2
@ -15,6 +15,8 @@ Version 2.1.0
|
|||||||
+ Added links to mcMMO related websites to various commands
|
+ Added links to mcMMO related websites to various commands
|
||||||
+ Certain elements of mcMMO's UI have been restyled
|
+ Certain elements of mcMMO's UI have been restyled
|
||||||
+ Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out
|
+ 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) 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)
|
+ (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)
|
+ (Events) Starting an XP event will now use the title API (toggle this in advanced.yml)
|
||||||
|
@ -219,7 +219,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSkillBlock(PrimarySkillType skill, Material data)
|
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data)
|
||||||
{
|
{
|
||||||
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||||
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
||||||
@ -232,7 +232,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
return config.contains(wildcardString);
|
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 baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||||
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
||||||
|
@ -172,7 +172,7 @@ public final class BlockUtils {
|
|||||||
* @return true if the block should affected by Green Terra, false otherwise
|
* @return true if the block should affected by Green Terra, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean affectedByGreenTerra(BlockState blockState) {
|
public static boolean affectedByGreenTerra(BlockState blockState) {
|
||||||
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.HERBALISM, blockState.getBlockData())) {
|
if (ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.HERBALISM, blockState.getBlockData())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ public final class BlockUtils {
|
|||||||
* otherwise
|
* otherwise
|
||||||
*/
|
*/
|
||||||
public static Boolean affectedBySuperBreaker(BlockState blockState) {
|
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 true;
|
||||||
|
|
||||||
return isOre(blockState) || mcMMO.getModManager().isCustomMiningBlock(blockState);
|
return isOre(blockState) || mcMMO.getModManager().isCustomMiningBlock(blockState);
|
||||||
@ -203,7 +203,7 @@ public final class BlockUtils {
|
|||||||
* otherwise
|
* otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean affectedByGigaDrillBreaker(BlockState blockState) {
|
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 true;
|
||||||
return mcMMO.getModManager().isCustomExcavationBlock(blockState);
|
return mcMMO.getModManager().isCustomExcavationBlock(blockState);
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ public final class BlockUtils {
|
|||||||
* @return true if the block is a log, false otherwise
|
* @return true if the block is a log, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isLog(BlockState blockState) {
|
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 true;
|
||||||
return mcMMO.getModManager().isCustomLog(blockState);
|
return mcMMO.getModManager().isCustomLog(blockState);
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,16 @@ Experience:
|
|||||||
Red_Mushroom_Block: 70
|
Red_Mushroom_Block: 70
|
||||||
Brown_Mushroom_Block: 70
|
Brown_Mushroom_Block: 70
|
||||||
Herbalism:
|
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
|
Allium: 300
|
||||||
Azure_Bluet: 150
|
Azure_Bluet: 150
|
||||||
Beetroots_Ripe: 50
|
Beetroots_Ripe: 50
|
||||||
@ -211,6 +221,7 @@ Experience:
|
|||||||
Netherrack: 30
|
Netherrack: 30
|
||||||
Obsidian: 150
|
Obsidian: 150
|
||||||
Packed_Ice: 50
|
Packed_Ice: 50
|
||||||
|
Blue_Ice: 100
|
||||||
Nether_Quartz_Ore: 100
|
Nether_Quartz_Ore: 100
|
||||||
Redstone_Ore: 150
|
Redstone_Ore: 150
|
||||||
Sandstone: 30
|
Sandstone: 30
|
||||||
|
Loading…
Reference in New Issue
Block a user