Add + Wire DiminishingReturn config values

Removed the experience multiplier from the xp conversion task, it just
seems like something very unecessary
This commit is contained in:
nossr50
2019-05-13 02:55:20 -07:00
parent 6425cd18b8
commit 2e3f9b4a96
17 changed files with 146 additions and 55 deletions

View File

@@ -1,6 +1,6 @@
package com.gmail.nossr50.util.experience;
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
import com.gmail.nossr50.api.exceptions.UndefinedSkillBehaviour;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
import org.bukkit.Material;
@@ -193,11 +193,11 @@ public class ExperienceMapManager {
* @param primarySkillType target skill
* @param material target material
* @return XP value for breaking this block for said skill
* @throws InvalidSkillException for skills that don't give block break experience
* @throws UndefinedSkillBehaviour for skills that don't give block break experience
* @deprecated its faster to use direct calls to get XP, for example getMiningXP(Material material) instead of using this method
*/
@Deprecated
public float getBlockBreakXpValue(PrimarySkillType primarySkillType, Material material) throws InvalidSkillException {
public float getBlockBreakXpValue(PrimarySkillType primarySkillType, Material material) throws UndefinedSkillBehaviour {
switch (primarySkillType) {
case MINING:
return getMiningXp(material);
@@ -208,7 +208,7 @@ public class ExperienceMapManager {
case WOODCUTTING:
return getWoodcuttingXp(material);
default:
throw new InvalidSkillException();
throw new UndefinedSkillBehaviour(primarySkillType);
}
}