mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Add player tamed experience multiplier
This commit is contained in:
parent
80c89fe1e5
commit
d4699c0e20
@ -4,6 +4,7 @@ Version 2.1.148
|
|||||||
Made some optimizations to combat processing
|
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 '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 '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 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)
|
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
|
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
|
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 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:
|
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.
|
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.
|
||||||
|
@ -176,6 +176,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
/* Spawned Mob modifier */
|
/* Spawned Mob modifier */
|
||||||
public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0); }
|
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 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 getNetherPortalXpMultiplier() { return config.getDouble("Experience_Formula.Nether_Portal.Multiplier", 0.0); }
|
||||||
public double getBredMobXpMultiplier() { return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0); }
|
public double getBredMobXpMultiplier() { return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0); }
|
||||||
|
|
||||||
|
@ -815,6 +815,8 @@ public final class CombatUtils {
|
|||||||
baseXP *= ExperienceConfig.getInstance().getEggXpMultiplier();
|
baseXP *= ExperienceConfig.getInstance().getEggXpMultiplier();
|
||||||
} else if (getPersistentData().hasMobFlag(MobMetaFlagType.PLAYER_BRED_MOB, target)) {
|
} else if (getPersistentData().hasMobFlag(MobMetaFlagType.PLAYER_BRED_MOB, target)) {
|
||||||
baseXP *= ExperienceConfig.getInstance().getBredMobXpMultiplier();
|
baseXP *= ExperienceConfig.getInstance().getBredMobXpMultiplier();
|
||||||
|
} else if(getPersistentData().hasMobFlag(MobMetaFlagType.PLAYER_TAMED_MOB, target)) {
|
||||||
|
baseXP *= ExperienceConfig.getInstance().getTamedMobXpMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
baseXP *= 10;
|
baseXP *= 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user