public interface ElementFace
extends net.kyori.examination.Examinable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ElementFace.Builder
Builder implementation for creating
ElementFace instances |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ROTATION |
static int |
DEFAULT_TINT_INDEX |
static float |
MINECRAFT_UV_UNIT
Deprecated.
Should not be exposed, moved to serializer
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull ElementFace.Builder |
builder()
Deprecated.
Use
face() instead |
@Nullable CubeFace |
cullFace()
Returns whether a face does not need to be rendered
when there is a block touching it in the specified
position.
|
static @NotNull ElementFace.Builder |
face()
Creates a new element face builder instance.
|
static @NotNull ElementFace |
face(@Nullable TextureUV uv,
@NotNull java.lang.String texture,
@Nullable CubeFace cullFace,
int rotation,
int tintIndex)
Creates a new
ElementFace instance from
the provided values |
static @NotNull ElementFace |
of(@Nullable Vector4Float uv,
@NotNull java.lang.String texture,
@Nullable CubeFace cullFace,
int rotation,
int tintIndex)
Deprecated.
Use
face(TextureUV, String, CubeFace, int, int) instead |
int |
rotation()
Returns this face texture rotation, it rotates the texture
by the specified number of degrees.
|
@NotNull java.lang.String |
texture()
Returns this face's texture in variable
form prepended with a "#"
|
int |
tintIndex()
Determines whether to tint the texture using a hardcoded tint
index.
|
default @Nullable Vector4Float |
uv()
Deprecated.
Use
uv0() instead |
@Nullable TextureUV |
uv0()
Deprecated.
Will be renamed to "uv" in 2.0.0
|
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") static final float MINECRAFT_UV_UNIT
static final int DEFAULT_ROTATION
static final int DEFAULT_TINT_INDEX
@NotNull static @NotNull ElementFace face(@Nullable @Nullable TextureUV uv, @NotNull @NotNull java.lang.String texture, @Nullable @Nullable CubeFace cullFace, int rotation, int tintIndex)
ElementFace instance from
the provided valuesuv - The texture area to use, will be automatically
generated by the client if not settexture - The texture namecullFace - The element face cull facerotation - The face rotation, must be multiple
of 90 and be less than 360tintIndex - The face tint indexElementFace instance@NotNull static @NotNull ElementFace.Builder face()
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @NotNull static @NotNull ElementFace of(@Nullable @Nullable Vector4Float uv, @NotNull @NotNull java.lang.String texture, @Nullable @Nullable CubeFace cullFace, int rotation, int tintIndex)
face(TextureUV, String, CubeFace, int, int) insteadElementFace instance from
the provided valuesuv - The texture area to use, will be automatically
generated by the client if not settexture - The texture namecullFace - The element face cull facerotation - The face rotation, must be multiple
of 90 and be less than 360tintIndex - The face tint indexElementFace instance@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @NotNull static @NotNull ElementFace.Builder builder()
face() insteadElementFace
instances@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Nullable default @Nullable Vector4Float uv()
uv0() insteadAll components are always between 0 and 1 and then converted to 0-16 (Minecraft UV) when creating the resource pack
If the numbers of x1 and x2 are swapped the texture flips
UV is optional, and if not supplied it automatically generates based on the element's position.
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Nullable @Nullable TextureUV uv0()
If the UV is not specified, it will be automatically generated based on the element's position and face.
@NotNull @NotNull java.lang.String texture()
@Nullable @Nullable CubeFace cullFace()
int rotation()
Rotation does not affect which part of the texture is used. Instead, it amounts to permutation of the selected texture vertexes (selected implicitly, or explicitly though uv)
int tintIndex()