public final class ItemTextureQuadConverter
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
ItemTextureQuadConverter() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<BakedQuad> |
convertTexture(TransformationMatrix transform,
TextureAtlasSprite template,
TextureAtlasSprite sprite,
float z,
Direction facing,
int color,
int tint)
Takes a texture and converts it into BakedQuads.
|
static java.util.List<BakedQuad> |
convertTextureHorizontal(TransformationMatrix transform,
TextureAtlasSprite template,
TextureAtlasSprite sprite,
float z,
Direction facing,
int color,
int tint)
Scans a texture and converts it into a list of horizontal strips stacked on top of each other.
|
static java.util.List<BakedQuad> |
convertTextureVertical(TransformationMatrix transform,
TextureAtlasSprite template,
TextureAtlasSprite sprite,
float z,
Direction facing,
int color,
int tint)
Scans a texture and converts it into a list of vertical strips stacked next to each other from left to right.
|
static BakedQuad |
genQuad(TransformationMatrix transform,
float x1,
float y1,
float x2,
float y2,
float z,
TextureAtlasSprite sprite,
Direction facing,
int color,
int tint)
Generates a Front/Back quad for an itemmodel.
|
private static boolean |
isVisible(int color) |
private static BakedQuad |
putQuad(TransformationMatrix transform,
Direction side,
TextureAtlasSprite sprite,
int color,
int tint,
float x1,
float y1,
float x2,
float y2,
float z,
float u1,
float v1,
float u2,
float v2) |
private static void |
putVertex(IVertexConsumer consumer,
Direction side,
float x,
float y,
float z,
float u,
float v,
int color) |
public static java.util.List<BakedQuad> convertTexture(TransformationMatrix transform, TextureAtlasSprite template, TextureAtlasSprite sprite, float z, Direction facing, int color, int tint)
format
- template
- The input texture to convertsprite
- The texture whose UVs shall be usedpublic static java.util.List<BakedQuad> convertTextureHorizontal(TransformationMatrix transform, TextureAtlasSprite template, TextureAtlasSprite sprite, float z, Direction facing, int color, int tint)
public static java.util.List<BakedQuad> convertTextureVertical(TransformationMatrix transform, TextureAtlasSprite template, TextureAtlasSprite sprite, float z, Direction facing, int color, int tint)
private static boolean isVisible(int color)
public static BakedQuad genQuad(TransformationMatrix transform, float x1, float y1, float x2, float y2, float z, TextureAtlasSprite sprite, Direction facing, int color, int tint)
private static BakedQuad putQuad(TransformationMatrix transform, Direction side, TextureAtlasSprite sprite, int color, int tint, float x1, float y1, float x2, float y2, float z, float u1, float v1, float u2, float v2)
private static void putVertex(IVertexConsumer consumer, Direction side, float x, float y, float z, float u, float v, int color)