mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
parent
c83d011faa
commit
e77801f3c1
@ -190,6 +190,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||||
public double getAnimalsXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP()); }
|
public double getAnimalsXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP()); }
|
||||||
public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
||||||
|
public boolean hasCombatXP(EntityType entity) {return config.contains("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||||
|
|
||||||
/* Materials */
|
/* Materials */
|
||||||
public int getXp(SkillType skill, MaterialData data)
|
public int getXp(SkillType skill, MaterialData data)
|
||||||
|
@ -477,7 +477,12 @@ public final class CombatUtils {
|
|||||||
else if (target instanceof Monster)
|
else if (target instanceof Monster)
|
||||||
{
|
{
|
||||||
EntityType type = target.getType();
|
EntityType type = target.getType();
|
||||||
|
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
EntityType type = target.getType();
|
||||||
|
|
||||||
|
if (ExperienceConfig.getInstance().hasCombatXP(type)) {
|
||||||
if (type == EntityType.IRON_GOLEM)
|
if (type == EntityType.IRON_GOLEM)
|
||||||
{
|
{
|
||||||
if (!((IronGolem) target).isPlayerCreated()) {
|
if (!((IronGolem) target).isPlayerCreated()) {
|
||||||
@ -488,12 +493,13 @@ public final class CombatUtils {
|
|||||||
{
|
{
|
||||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
baseXP = 1.0;
|
baseXP = 1.0;
|
||||||
mcMMO.getModManager().addCustomEntity(target);
|
mcMMO.getModManager().addCustomEntity(target);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (target.hasMetadata(mcMMO.entityMetadataKey)) {
|
if (target.hasMetadata(mcMMO.entityMetadataKey)) {
|
||||||
baseXP *= ExperienceConfig.getInstance().getSpawnedMobXpMultiplier();
|
baseXP *= ExperienceConfig.getInstance().getSpawnedMobXpMultiplier();
|
||||||
|
Loading…
Reference in New Issue
Block a user