public final class Texture
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
net.minecraft.util.Identifier |
image
The image of this texture.
|
float |
u1
The UV coordinates of this texture, between 0 and 1.
|
float |
u2
The UV coordinates of this texture, between 0 and 1.
|
float |
v1
The UV coordinates of this texture, between 0 and 1.
|
float |
v2
The UV coordinates of this texture, between 0 and 1.
|
| Constructor and Description |
|---|
Texture(net.minecraft.util.Identifier image)
Constructs a new texture that uses the full image.
|
Texture(net.minecraft.util.Identifier image,
float u1,
float v1,
float u2,
float v2)
Constructs a new texture with custom UV values.
|
| Modifier and Type | Method and Description |
|---|---|
Texture |
withUv(float u1,
float v1,
float u2,
float v2)
Creates a new texture with different UV values.
|
public final net.minecraft.util.Identifier image
public final float u1
public final float v1
public final float u2
public final float v2
public Texture(net.minecraft.util.Identifier image)
image - the imagejava.lang.NullPointerException - if the image is nullpublic Texture(net.minecraft.util.Identifier image,
float u1,
float v1,
float u2,
float v2)
image - the imageu1 - the left U coordinatev1 - the top V coordinateu2 - the right U coordinatev2 - the bottom V coordinatejava.lang.NullPointerException - if the image is nullpublic Texture withUv(float u1, float v1, float u2, float v2)
u1 - the left U coordinatev1 - the top V coordinateu2 - the right U coordinatev2 - the bottom V coordinate