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

@@ -12,12 +12,18 @@ public class ImageBufferDownloadAlt extends ImageBufferDownload {
private int imageWidth;
private int imageHeight;
private boolean version;
public boolean skinTexture = true;
// If Version == true, use 64 Loader
public ImageBufferDownloadAlt(boolean ver){
this.version = ver;
}
public ImageBufferDownloadAlt(boolean ver, boolean skinTexture){
this.version = ver;
this.skinTexture = skinTexture;
}
@Override
public BufferedImage parseUserSkin(BufferedImage bufferedimage) {
@@ -31,7 +37,8 @@ public class ImageBufferDownloadAlt extends ImageBufferDownload {
g.dispose();
imageData = ((DataBufferInt) bufferedimage1.getRaster().getDataBuffer()).getData();
setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight / 4);
if(skinTexture)
setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight / 4);
return bufferedimage1;
}