public class GuiTexture
extends java.lang.Object
MalisisGui.ResourceLocation if the resource is inside the project, from a File or directly from a
BufferedImage.ResourceLocation, the original dimension should be specified if parts of the texture is to be retrieved as
Icon.| Modifier and Type | Field and Description |
|---|---|
protected int |
height |
protected net.minecraft.util.ResourceLocation |
resourceLocation |
protected int |
width |
| Constructor and Description |
|---|
GuiTexture(java.awt.image.BufferedImage image,
java.lang.String name)
Instantiates a new
GuiTexture. |
GuiTexture(java.io.File file)
Instantiates a new
GuiTexture. |
GuiTexture(net.minecraft.util.ResourceLocation rl)
Instantiates a new
GuiTexture. |
GuiTexture(net.minecraft.util.ResourceLocation rl,
int width,
int height)
Instantiates a new
GuiTexture. |
| Modifier and Type | Method and Description |
|---|---|
Icon |
createIcon(int x,
int y,
int width,
int height)
Creates the
Icon and initializes it. |
void |
delete() |
int |
getHeight()
Gets the height of this
GuiTexture. |
GuiIcon |
getIcon(int x,
int y,
int width,
int height)
Gets a
GuiIcon from a single icon (used for single face shapes). |
net.minecraft.util.ResourceLocation |
getResourceLocation()
Gets the
ResourceLocation of this GuiTexture. |
int |
getWidth()
Gets the width of this
GuiTexture. |
GuiIcon |
getXResizableIcon(int x,
int y,
int width,
int height,
int side)
Gets a
GuiIcon that is resizable only on the X axis. |
GuiIcon |
getXYResizableIcon(int x,
int y,
int width,
int height,
int corner)
Gets a
GuiIcon that is resizable from both X and Y axis. |
java.lang.String |
toString() |
protected net.minecraft.util.ResourceLocation resourceLocation
protected int width
protected int height
public GuiTexture(net.minecraft.util.ResourceLocation rl,
int width,
int height)
GuiTexture.rl - the rlwidth - the widthheight - the heightpublic GuiTexture(java.io.File file)
throws java.io.IOException
file - the filejava.io.IOException - Signals that an I/O exception has occurred.public GuiTexture(java.awt.image.BufferedImage image,
java.lang.String name)
image - the imagename - the namepublic GuiTexture(net.minecraft.util.ResourceLocation rl)
GuiTexture.rl - the rlpublic int getWidth()
GuiTexture.public int getHeight()
GuiTexture.public net.minecraft.util.ResourceLocation getResourceLocation()
ResourceLocation of this GuiTexture.public Icon createIcon(int x, int y, int width, int height)
Icon and initializes it.x - the xy - the ywidth - the widthheight - the heightIconpublic GuiIcon getIcon(int x, int y, int width, int height)
GuiIcon from a single icon (used for single face shapes).x - the xy - the ywidth - the widthheight - the heightpublic GuiIcon getXYResizableIcon(int x, int y, int width, int height, int corner)
GuiIcon that is resizable from both X and Y axis.GuiIcon will hold 9 icons that will behave when resized :x - the xy - the ywidth - the widthheight - the heightcorner - the cornerpublic GuiIcon getXResizableIcon(int x, int y, int width, int height, int side)
GuiIcon that is resizable only on the X axis.GuiIcon will hold 3 icons that will behave when resized :x - the xy - the ywidth - the widthheight - the heightside - the sidepublic void delete()
public java.lang.String toString()
toString in class java.lang.Object