// Path: src/main/java/com/github/lunatrius/ingameinfo/reference/Reference.java
// public class Reference {
//     public static final String MODID = "ingameinfoxml";
//     public static final String NAME = "InGame Info XML";
//     public static final String VERSION = "${version}";
//     public static final String FORGE = "${forgeversion}";
//     public static final String MINECRAFT = "${mcversion}";
//     public static final String PROXY_SERVER = "com.github.lunatrius.ingameinfo.proxy.ServerProxy";
//     public static final String PROXY_CLIENT = "com.github.lunatrius.ingameinfo.proxy.ClientProxy";
//     public static final String GUI_FACTORY = "com.github.lunatrius.ingameinfo.client.gui.config.GuiFactory";
// 
//     public static Logger logger = LogManager.getLogger(Reference.MODID);
// }
// 
// Path: src/main/java/com/github/lunatrius/ingameinfo/tag/registry/TagRegistry.java
// public class TagRegistry {
//     public static final TagRegistry INSTANCE = new TagRegistry();
// 
//     private Map<String, Tag> stringTagMap = new HashMap<String, Tag>();
// 
//     private void register(final String name, final Tag tag) {
//         if (this.stringTagMap.containsKey(name)) {
//             Reference.logger.error("Duplicate tag key '" + name + "'!");
//             return;
//         }
// 
//         if (name == null) {
//             Reference.logger.error("Tag name cannot be null!");
//             return;
//         }
// 
//         this.stringTagMap.put(name.toLowerCase(Locale.ENGLISH), tag);
//     }
// 
//     public void register(final Tag tag) {
//         register(tag.getName(), tag);
// 
//         for (final String name : tag.getAliases()) {
//             register(name, tag);
//         }
//     }
// 
//     public String getValue(final String name) {
//         final Tag tag = this.stringTagMap.get(name.toLowerCase(Locale.ENGLISH));
//         return tag != null ? tag.getValue() : null;
//     }
// 
//     public List<Tag> getRegisteredTags() {
//         final List<Tag> tags = new ArrayList<Tag>();
//         for (final Map.Entry<String, Tag> entry : this.stringTagMap.entrySet()) {
//             tags.add(entry.getValue());
//         }
//         return tags;
//     }
// 
//     public void init() {
//         TagFormatting.register();
//         TagMisc.register();
//         TagMouseOver.register();
//         TagNearbyPlayer.register();
//         TagPlayerEquipment.register();
//         TagPlayerGeneral.register();
//         TagPlayerPosition.register();
//         TagPlayerPotion.register();
//         TagRiding.register();
//         TagTime.register();
//         TagWorld.register();
// 
//         Reference.logger.info("Registered " + this.stringTagMap.size() + " tags.");
//     }
// }


import com.github.lunatrius.ingameinfo.reference.Reference;
import com.github.lunatrius.ingameinfo.tag.registry.TagRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.passive.AbstractHorse;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
        @Override
        public String getValue() {
            final Entity ridingEntity = player.getRidingEntity();
            if (ridingEntity instanceof AbstractHorse) {
                return String.format(Locale.ENGLISH, "%.3f", TICKS * CONSTANT * ((AbstractHorse) ridingEntity).getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue());
            }
            return "-1";
        }
    }

    public static class HorseJump extends TagRiding {
        private final Map<Double, Double> jumpHeightCache = new HashMap<Double, Double>();

        private double getJumpHeight(final AbstractHorse horse) {
            final double jumpStrength = horse.getHorseJumpStrength();

            final Double height = this.jumpHeightCache.get(jumpStrength);
            if (height != null) {
                return height;
            }

            double jumpHeight = 0;
            double velocity = jumpStrength;
            while (velocity > 0) {
                jumpHeight += velocity;
                velocity -= 0.08;
                velocity *= 0.98;
            }

            if (this.jumpHeightCache.size() > 16) {
// Path: src/main/java/com/github/lunatrius/ingameinfo/reference/Reference.java
// public class Reference {
//     public static final String MODID = "ingameinfoxml";
//     public static final String NAME = "InGame Info XML";
//     public static final String VERSION = "${version}";
//     public static final String FORGE = "${forgeversion}";
//     public static final String MINECRAFT = "${mcversion}";
//     public static final String PROXY_SERVER = "com.github.lunatrius.ingameinfo.proxy.ServerProxy";
//     public static final String PROXY_CLIENT = "com.github.lunatrius.ingameinfo.proxy.ClientProxy";
//     public static final String GUI_FACTORY = "com.github.lunatrius.ingameinfo.client.gui.config.GuiFactory";
// 
//     public static Logger logger = LogManager.getLogger(Reference.MODID);
// }
// 
// Path: src/main/java/com/github/lunatrius/ingameinfo/tag/registry/TagRegistry.java
// public class TagRegistry {
//     public static final TagRegistry INSTANCE = new TagRegistry();
// 
//     private Map<String, Tag> stringTagMap = new HashMap<String, Tag>();
// 
//     private void register(final String name, final Tag tag) {
//         if (this.stringTagMap.containsKey(name)) {
//             Reference.logger.error("Duplicate tag key '" + name + "'!");
//             return;
//         }
// 
//         if (name == null) {
//             Reference.logger.error("Tag name cannot be null!");
//             return;
//         }
// 
//         this.stringTagMap.put(name.toLowerCase(Locale.ENGLISH), tag);
//     }
// 
//     public void register(final Tag tag) {
//         register(tag.getName(), tag);
// 
//         for (final String name : tag.getAliases()) {
//             register(name, tag);
//         }
//     }
// 
//     public String getValue(final String name) {
//         final Tag tag = this.stringTagMap.get(name.toLowerCase(Locale.ENGLISH));
//         return tag != null ? tag.getValue() : null;
//     }
// 
//     public List<Tag> getRegisteredTags() {
//         final List<Tag> tags = new ArrayList<Tag>();
//         for (final Map.Entry<String, Tag> entry : this.stringTagMap.entrySet()) {
//             tags.add(entry.getValue());
//         }
//         return tags;
//     }
// 
//     public void init() {
//         TagFormatting.register();
//         TagMisc.register();
//         TagMouseOver.register();
//         TagNearbyPlayer.register();
//         TagPlayerEquipment.register();
//         TagPlayerGeneral.register();
//         TagPlayerPosition.register();
//         TagPlayerPotion.register();
//         TagRiding.register();
//         TagTime.register();
//         TagWorld.register();
// 
//         Reference.logger.info("Registered " + this.stringTagMap.size() + " tags.");
//     }
// }


// Path: src/main/java/com/github/lunatrius/ingameinfo/tag/TagRiding.java
import com.github.lunatrius.ingameinfo.reference.Reference;
import com.github.lunatrius.ingameinfo.tag.registry.TagRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.passive.AbstractHorse;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

        @Override
        public String getValue() {
            final Entity ridingEntity = player.getRidingEntity();
            if (ridingEntity instanceof AbstractHorse) {
                return String.format(Locale.ENGLISH, "%.3f", TICKS * CONSTANT * ((AbstractHorse) ridingEntity).getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue());
            }
            return "-1";
        }
    }

    public static class HorseJump extends TagRiding {
        private final Map<Double, Double> jumpHeightCache = new HashMap<Double, Double>();

        private double getJumpHeight(final AbstractHorse horse) {
            final double jumpStrength = horse.getHorseJumpStrength();

            final Double height = this.jumpHeightCache.get(jumpStrength);
            if (height != null) {
                return height;
            }

            double jumpHeight = 0;
            double velocity = jumpStrength;
            while (velocity > 0) {
                jumpHeight += velocity;
                velocity -= 0.08;
                velocity *= 0.98;
            }

            if (this.jumpHeightCache.size() > 16) {
                Reference.logger.trace("Clearing horse jump height cache.");