global.tfc_classes = {};

function createClass(id)
{
    let createdClass = {
        id: id,
        allowed_blocks: [],
        allowed_items: [],
        allowed_entities: []
    };
    global.tfc_classes[id] = createdClass;
    return createdClass;
}

global.tfc_classes_involved = {
    blocks: [],
    items: [],
    entities: []
};

function findInvolvedStuff()
{
    for(const tfcClass of Object.values(global.tfc_classes))
    {
        Array.prototype.push.apply(global.tfc_classes_involved.blocks, tfcClass.allowed_blocks);
        Array.prototype.push.apply(global.tfc_classes_involved.items, tfcClass.allowed_items);
        Array.prototype.push.apply(global.tfc_classes_involved.entities, tfcClass.allowed_entities);
    }
}

createClasses();
findInvolvedStuff();