public static Tag<Map<String, Tag>> newCompound(Map<String, ?> data)
    throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, NoSuchMethodException, NBTLibDisabledException, UnknownTagException
    {
        Map<String, Tag> map;
        try
        {
            for(Object o : data.values().toArray())
            {
                Tag.class.cast(o);
            }
            map = (Map<String, Tag>)data;
        }
        catch(ClassCastException e)
        {
            map = new HashMap<String, Tag>();
            for(Map.Entry<String, ?> entry : data.entrySet())
            {
                map.put(entry.getKey(), parse(entry.getValue()));
            }
        }
        return new Tag<Map<String, Tag>>(NBT.COMPOUND, map);
    }