TexturedRect classes for GUIs & overlays, and Custom GUI buttons now support textures of all sizes when using URLs.

EntityCustomFX:
-Added URL support
This commit is contained in:
Luis C.M committed 2022-05-04 23:08:30 -05:00
1 parent 034707abd3
commit d6c46158f5
5 files changed
+21 -4

No files matched your search

@@ -53,7 +53,7 @@ public class CustomGuiButton extends GuiButton implements IClickListener {
if(texture.startsWith("https://")){
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject object = new ImageDownloadAlt(null, texture, SkinManager.field_152793_a, new ImageBufferDownloadAlt(false));
ITextureObject object = new ImageDownloadAlt(null, texture, new ResourceLocation("customnpcs:textures/gui/invisible.png"), new ImageBufferDownloadAlt(true,false));
texturemanager.loadTexture(this.texture, object);
}
}
@@ -57,7 +57,7 @@ public class CustomGuiTexturedRect extends Gui implements IGuiComponent {
if(texture.startsWith("https://")){
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject object = new ImageDownloadAlt(null, texture, SkinManager.field_152793_a, new ImageBufferDownloadAlt(false));
ITextureObject object = new ImageDownloadAlt(null, texture, new ResourceLocation("customnpcs:textures/gui/invisible.png"), new ImageBufferDownloadAlt(true,false));
texturemanager.loadTexture(this.texture, object);
}
}
@@ -55,7 +55,7 @@ public class CustomOverlayTexturedRect extends Gui implements IOverlayComponent
if(texture.startsWith("https://")){
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject object = new ImageDownloadAlt(null, texture, SkinManager.field_152793_a, new ImageBufferDownloadAlt(false));
ITextureObject object = new ImageDownloadAlt(null, texture, new ResourceLocation("customnpcs:textures/gui/invisible.png"), new ImageBufferDownloadAlt(true,false));
texturemanager.loadTexture(this.texture, object);
}
}