setValue("bred", false);
return;
}
EntityHorse ride = (EntityHorse) xride;
//setValue("jumping", ride.isHorseJumping()); // not functionnal
setValue("rearing", ride.isRearing());
setValue("saddled", ride.isHorseSaddled());
setValue("leashed", ride.getLeashed());
setValue("chested", ride.isChested());
setValue("tame", ride.isTame());
setValue("type", ride.getHorseType());
setValue("variant", ride.getHorseVariant());
setValue("name_tag", ride.getCustomNameTag());
setValue("health1k", (int) (ride.getHealth() * 1000));
setValue("leashed_to_player", ride.getLeashed() && ride.getLeashedToEntity() instanceof EntityPlayer);
setValue(
"ridden_by_owner",
ride.riddenByEntity instanceof EntityPlayer
&& !ride.func_152119_ch().equals("")
&& ride.func_152119_ch().equals(((EntityPlayer) ride.riddenByEntity).getGameProfile().getId()));
setValue(
"leashed_to_owner",
ride.getLeashedToEntity() instanceof EntityPlayer
&& !ride.func_152119_ch().equals("")
&& ride.func_152119_ch().equals(((EntityPlayer) ride.getLeashedToEntity()).getGameProfile().getId()));
if (ride.getLeashed() && ride.getLeashedToEntity() != null)
{
Entity e = ride.getLeashedToEntity();
setValue("leash_distance", (int) (e.getDistanceToEntity(ride) * 1000));
}
else
{
setValue("leash_distance", 0);
}
// Server only?
setValue("temper", ride.getTemper());
setValue("owner_uuid", ride.func_152119_ch());
setValue("reproduced", ride.getHasReproduced());
setValue("bred", ride.func_110205_ce());
}