Skip to content

Commit

Permalink
Simplify, move variable closer to usage and clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DanVanAtta committed Jan 1, 2021
1 parent bfcf998 commit 1ecf69f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ public ResourceLoader(final String mapName) {

return new MapNotFoundException(mapName, getCandidatePaths(mapName));
});
mapPrefix = getMapPrefix(mapLocation);

// Add the assets folder from the game installation path. This assets folder supplements
// any map and resources not found in the map are searched for in this folder.
// any map resources.
final File gameAssetsDirectory =
findDirectory(ClientFileSystemHelper.getRootFolder(), ASSETS_FOLDER)
.orElseThrow(GameAssetsNotFoundException::new);

mapPrefix = getMapPrefix(mapLocation);

// Note: URLClassLoader does not always respect the ordering of the search URLs
// To solve this we will get all matching paths and then filter by what matched
// the assets folder.
Expand Down

0 comments on commit 1ecf69f

Please sign in to comment.