use of org.apollo.cache.map.MapFile in project apollo by apollo-rsps.
the class WorldMapDecoder method run.
/**
* Decode all {@link MapFile}s and notify the {@link CollisionManager} of any tiles that are
* flagged as blocked or on a bridge.
*/
@Override
public void run() {
Map<Integer, MapIndex> mapIndices = MapIndex.getIndices();
try {
for (MapIndex index : mapIndices.values()) {
MapFileDecoder decoder = MapFileDecoder.create(fs, index);
MapFile mapFile = decoder.decode();
MapPlane[] mapPlanes = mapFile.getPlanes();
int mapX = index.getX(), mapY = index.getY();
for (MapPlane plane : mapPlanes) {
markTiles(mapX, mapY, plane);
}
}
} catch (IOException ex) {
throw new UncheckedIOException(ex);
}
}
Aggregations