Search in sources :

Example 1 with AreaLoader

use of net.runelite.cache.definitions.loaders.AreaLoader in project runelite by runelite.

the class AreaManager method load.

public void load() throws IOException {
    Storage storage = store.getStorage();
    Index index = store.getIndex(IndexType.CONFIGS);
    Archive archive = index.getArchive(ConfigType.AREA.getId());
    byte[] archiveData = storage.loadArchive(archive);
    ArchiveFiles files = archive.getFiles(archiveData);
    for (FSFile file : files.getFiles()) {
        AreaLoader loader = new AreaLoader();
        AreaDefinition area = loader.load(file.getContents(), file.getFileId());
        areas.put(area.id, area);
    }
}
Also used : AreaDefinition(net.runelite.cache.definitions.AreaDefinition) Storage(net.runelite.cache.fs.Storage) Archive(net.runelite.cache.fs.Archive) ArchiveFiles(net.runelite.cache.fs.ArchiveFiles) Index(net.runelite.cache.fs.Index) AreaLoader(net.runelite.cache.definitions.loaders.AreaLoader) FSFile(net.runelite.cache.fs.FSFile)

Aggregations

AreaDefinition (net.runelite.cache.definitions.AreaDefinition)1 AreaLoader (net.runelite.cache.definitions.loaders.AreaLoader)1 Archive (net.runelite.cache.fs.Archive)1 ArchiveFiles (net.runelite.cache.fs.ArchiveFiles)1 FSFile (net.runelite.cache.fs.FSFile)1 Index (net.runelite.cache.fs.Index)1 Storage (net.runelite.cache.fs.Storage)1