mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +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 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 boolean hasCombatXP(EntityType entity) {return config.contains("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||
|
||||
/* Materials */
|
||||
public int getXp(SkillType skill, MaterialData data)
|
||||
|
@ -477,22 +477,28 @@ public final class CombatUtils {
|
||||
else if (target instanceof Monster)
|
||||
{
|
||||
EntityType type = target.getType();
|
||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||
}
|
||||
else {
|
||||
EntityType type = target.getType();
|
||||
|
||||
if (type == EntityType.IRON_GOLEM)
|
||||
{
|
||||
if (!((IronGolem) target).isPlayerCreated()) {
|
||||
if (ExperienceConfig.getInstance().hasCombatXP(type)) {
|
||||
if (type == EntityType.IRON_GOLEM)
|
||||
{
|
||||
if (!((IronGolem) target).isPlayerCreated()) {
|
||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||
baseXP = 1.0;
|
||||
mcMMO.getModManager().addCustomEntity(target);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
baseXP = 1.0;
|
||||
mcMMO.getModManager().addCustomEntity(target);
|
||||
}
|
||||
|
||||
if (target.hasMetadata(mcMMO.entityMetadataKey)) {
|
||||
|
Loading…
Reference in New Issue
Block a user