mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Added Donkeys and Mules to the list of animals that display stats (#4282)
...in Beast Lore. I improperly assumed that donkeys and mules have fixed jump and movement speeds, but ones that are *bred* have variable stats just like horses.
This commit is contained in:
parent
80e9111f78
commit
df56d93aaa
@ -249,8 +249,9 @@ public class TamingManager extends SkillManager {
|
||||
|
||||
message = message.concat(LocaleLoader.getString("Combat.BeastLoreHealth", target.getHealth(), target.getMaxHealth()));
|
||||
|
||||
if (beast instanceof Horse) {
|
||||
Horse horse = (Horse) beast;
|
||||
// Bred mules & donkeys can actually have horse-like stats, but llamas cannot.
|
||||
if (beast instanceof AbstractHorse && !(beast instanceof Llama)) {
|
||||
AbstractHorse horse = (AbstractHorse) beast;
|
||||
double jumpStrength = horse.getAttribute(Attribute.HORSE_JUMP_STRENGTH).getValue();
|
||||
// Taken from https://minecraft.gamepedia.com/Horse#Jump_strength
|
||||
jumpStrength = -0.1817584952 * Math.pow(jumpStrength, 3) + 3.689713992 * Math.pow(jumpStrength, 2) + 2.128599134 * jumpStrength - 0.343930367;
|
||||
|
Loading…
Reference in New Issue
Block a user