| Constructor and Description |
|---|
TextureIcon(net.minecraft.util.Identifier texture)
Constructs a new texture icon.
|
TextureIcon(Texture texture)
Constructs a new texture icon.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColor()
Gets the color tint of the texture.
|
float |
getOpacity()
Gets the opacity of the texture.
|
void |
paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int size)
Paints this icon.
|
TextureIcon |
setColor(int color)
Sets the color tint of the texture.
|
TextureIcon |
setOpacity(float opacity)
Sets the opacity of the texture.
|
public TextureIcon(net.minecraft.util.Identifier texture)
texture - the identifier of the icon texturepublic TextureIcon(Texture texture)
texture - the identifier of the icon texturepublic float getOpacity()
public TextureIcon setOpacity(float opacity)
opacity - the new opacity between 0 (fully transparent) and 1 (fully opaque)public int getColor()
public TextureIcon setColor(int color)
color - the new color tint@Environment(value=CLIENT)
public void paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int size)
Icon