protected Component getComponent(Entity e, ComponentType type)
    {
        Bag<Component> bag = componentsByType.get(type.getId());
        
        if (bag != null && e.getId() < bag.getCapacity())
        {
            return bag.get(e.getId());
        }
        
        return null;
    }