Skip to content

Commit

Permalink
pink :(
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Dec 16, 2024
1 parent 44730ee commit c7e8c87
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ protected AbstractTexture createPBRTexture(ResourceLocation imageLocation, Resou
ResourceLocation pbrImageLocation = imageLocation.withPath(pbrType::appendSuffix);

SimpleTexture pbrTexture = new SimpleTexture(pbrImageLocation);
pbrTexture.apply(loadContentsSafe(pbrTexture, resourceManager));
TextureContents contents = loadContentsSafe(pbrTexture, resourceManager);

if (contents != null) {
pbrTexture.releaseId();
return null;
}
pbrTexture.apply(contents);

return pbrTexture;
}
Expand All @@ -43,7 +49,7 @@ private TextureContents loadContentsSafe(ReloadableTexture texture, ResourceMana
try {
return texture.loadContents(manager);
} catch (Exception var4) {
return TextureContents.createMissing();
return null;
}
}
}

0 comments on commit c7e8c87

Please sign in to comment.