Refactor Overlays to support URL

This commit is contained in:
Kam committed 2023-11-06 03:56:09 -05:00
1 parent f1b7f2dac7
commit d8097368cc
5 files changed
+52 -62

No files matched your search

@@ -74,6 +74,17 @@ public class ImageData {
}
}
public void renderEngineBind() {
ResourceLocation location = this.getLocation();
if (location != null && !this.invalid) {
try {
RenderNPCInterface.staticRenderManager.renderEngine.bindTexture(location);
} catch (Exception exception) {
this.invalid = true;
}
}
}
private ResourceLocation getLocation() {
return this.isUrl && this.imageDownloadAlt.getBufferedImage() == null ? null : this.location;
}