mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Added Horses to Taming.
This commit is contained in:
@ -34,6 +34,7 @@ public class Taming {
|
||||
|
||||
public static int wolfXp = ExperienceConfig.getInstance().getTamingXPWolf();
|
||||
public static int ocelotXp = ExperienceConfig.getInstance().getTamingXPOcelot();
|
||||
public static int horseXp = ExperienceConfig.getInstance().getTamingXPHorse();
|
||||
|
||||
public static boolean canPreventDamage(Tameable pet, AnimalTamer owner) {
|
||||
return pet.isTamed() && owner instanceof Player && pet instanceof Wolf;
|
||||
|
@ -66,6 +66,10 @@ public class TamingManager extends SkillManager {
|
||||
*/
|
||||
public void awardTamingXP(LivingEntity entity) {
|
||||
switch (entity.getType()) {
|
||||
case HORSE:
|
||||
applyXpGain(Taming.horseXp);
|
||||
return;
|
||||
|
||||
case WOLF:
|
||||
applyXpGain(Taming.wolfXp);
|
||||
return;
|
||||
@ -148,6 +152,17 @@ public class TamingManager extends SkillManager {
|
||||
callOfTheWild(EntityType.WOLF, Config.getInstance().getTamingCOTWWolfCost());
|
||||
}
|
||||
|
||||
/**
|
||||
* Summon a horse to your side.
|
||||
*/
|
||||
public void summonHorse() {
|
||||
if (!Permissions.callOfTheWild(getPlayer(), EntityType.HORSE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
callOfTheWild(EntityType.HORSE, Config.getInstance().getTamingCOTWHorseCost());
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Beast Lore ability.
|
||||
*
|
||||
|
Reference in New Issue
Block a user