diff --git a/Changelog.txt b/Changelog.txt index f8a82984b..b2103cc8a 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4,6 +4,7 @@ Version 2.1.148 Made some optimizations to combat processing New experience multiplier labeled 'Eggs' in experience.yml with a default value of 0 (previously mobs from eggs were using the Mobspawner experience multiplier) New experience multiplier labeled 'Nether_Portal' in experience.yml with a default value of 0 + New experience multiplier labeled 'Player_Tamed' in experience.yml with a default value of 0 Fixed a bug where mobs from eggs were only tracked if it was dispensed (egg tracking now tracks from egg items as well) Fixed a bug where egg spawned mobs were sometimes not marked as being from an egg (used in experience multipliers) @@ -18,6 +19,7 @@ Version 2.1.148 Endermen who target endermite are tracked persistently and are no longer forgotten about after a restart COTW spawned mobs are tracked persistently and are no longer forgotten about after a restart Player bred mobs are tracked persistently and are no longer forgotten about after a restart + Player tamed mobs are tracked persistently and are no longer forgotten about after a restart NOTES: Egg mobs & Nether portal pigs being assigned to the mobspawner xp multiplier didn't make sense to me, so it has been changed. They have their own XP multipliers now. 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 c009a4cc4..b094d0176 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -176,6 +176,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader { /* Spawned Mob modifier */ public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0); } public double getEggXpMultiplier() { return config.getDouble("Experience_Formula.Eggs.Multiplier", 0.0); } + public double getTamedMobXpMultiplier() { return config.getDouble("Experience_Formula.Player_Tamed.Multiplier", 0.0); } public double getNetherPortalXpMultiplier() { return config.getDouble("Experience_Formula.Nether_Portal.Multiplier", 0.0); } public double getBredMobXpMultiplier() { return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0); } diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index 500b6a63a..4413b1360 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -815,6 +815,8 @@ public final class CombatUtils { baseXP *= ExperienceConfig.getInstance().getEggXpMultiplier(); } else if (getPersistentData().hasMobFlag(MobMetaFlagType.PLAYER_BRED_MOB, target)) { baseXP *= ExperienceConfig.getInstance().getBredMobXpMultiplier(); + } else if(getPersistentData().hasMobFlag(MobMetaFlagType.PLAYER_TAMED_MOB, target)) { + baseXP *= ExperienceConfig.getInstance().getTamedMobXpMultiplier(); } baseXP *= 10;