mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 17:19:05 +00:00
Refactor Overlays to support URL
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user