mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 15:33:21 +00:00
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:
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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user