mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Set random jump strength for horses as well.
This commit is contained in:
parent
92b4be9a01
commit
7f290504ad
@ -234,10 +234,14 @@ public class TamingManager extends SkillManager {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HORSE:
|
case HORSE:
|
||||||
entity.setMaxHealth(15 + Misc.getRandom().nextInt(16));
|
Horse horse = (Horse) entity;
|
||||||
|
|
||||||
|
entity.setMaxHealth(15.0 + (Misc.getRandom().nextDouble() * 15));
|
||||||
entity.setHealth(entity.getMaxHealth());
|
entity.setHealth(entity.getMaxHealth());
|
||||||
((Horse) entity).setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
|
horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
|
||||||
((Horse) entity).setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
|
horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
|
||||||
|
horse.setJumpStrength(Misc.getRandom().nextDouble() * 2);
|
||||||
|
//TODO: setSpeed, once available
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user