Skip to content

Commit

Permalink
Simplify resource exist check in books
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Oct 6, 2021
1 parent 74ed954 commit be3a4ab
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,7 @@ public boolean resourceExists(@Nullable ResourceLocation location) {
if (location == null) {
return false;
}

try {
Minecraft.getInstance().getResourceManager().getResource(location);
return true;
} catch (IOException e) {
return false;
}
return Minecraft.getInstance().getResourceManager().hasResource(location);
}

@Override
Expand Down

0 comments on commit be3a4ab

Please sign in to comment.