// 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.tag.registry.TagRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityList;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
                    final IBlockState blockState = world.getBlockState(pos);
                    int power = -1;
                    for (final EnumFacing side : EnumFacing.VALUES) {
                        power = Math.max(power, blockState.getStrongPower(world, pos, side));

                        if (power >= 15) {
                            break;
                        }
                    }
                    return String.valueOf(power);
                }
            }
            return "-1";
        }
    }

    public static class PowerInput extends TagMouseOver {
        @Override
        public String getValue() {
            final RayTraceResult objectMouseOver = minecraft.objectMouseOver;
            if (objectMouseOver != null) {
                if (objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) {
                    return String.valueOf(world.isBlockIndirectlyGettingPowered(objectMouseOver.getBlockPos()));
                }
            }
            return "-1";
        }
    }

    public static void register() {
// 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/TagMouseOver.java
import com.github.lunatrius.ingameinfo.tag.registry.TagRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityList;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;

                    final IBlockState blockState = world.getBlockState(pos);
                    int power = -1;
                    for (final EnumFacing side : EnumFacing.VALUES) {
                        power = Math.max(power, blockState.getStrongPower(world, pos, side));

                        if (power >= 15) {
                            break;
                        }
                    }
                    return String.valueOf(power);
                }
            }
            return "-1";
        }
    }

    public static class PowerInput extends TagMouseOver {
        @Override
        public String getValue() {
            final RayTraceResult objectMouseOver = minecraft.objectMouseOver;
            if (objectMouseOver != null) {
                if (objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) {
                    return String.valueOf(world.isBlockIndirectlyGettingPowered(objectMouseOver.getBlockPos()));
                }
            }
            return "-1";
        }
    }

    public static void register() {
        TagRegistry.INSTANCE.register(new Name().setName("mouseovername"));