Class FaceBakery
java.lang.Object
net.minecraft.client.renderer.block.model.FaceBakery
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final floatprivate static final floatstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidapplyElementRotation(Vector3f vec, BlockElementRotation partRotation) private static voidapplyModelRotation(Vector3f pos, Transformation transform) static BakedQuadbakeQuad(Vector3f posFrom, Vector3f posTo, BlockElementFace face, TextureAtlasSprite sprite, Direction facing, ModelState transform, BlockElementRotation rotation, boolean shade, int lightEmission) private static voidbakeVertex(int[] vertexData, int vertexIndex, Direction facing, BlockFaceUV blockFaceUV, float[] posDiv16, TextureAtlasSprite sprite, Transformation transformation, BlockElementRotation partRotation) private static DirectioncalculateFacing(int[] faceData) private static voidfillVertex(int[] vertexData, int vertexIndex, Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) private static int[]makeVertices(BlockFaceUV uvs, TextureAtlasSprite sprite, Direction orientation, float[] posDiv16, Transformation transformation, BlockElementRotation partRotation) private static voidrecalculateWinding(int[] vertices, Direction direction) static BlockFaceUVrecomputeUVs(BlockFaceUV uv, Direction facing, Transformation rotation) private static voidrotateVertexBy(Vector3f pos, Vector3f origin, Matrix4f transform, Vector3f scale) private static float[]setupShape(Vector3f min, Vector3f max)
-
Field Details
-
VERTEX_INT_SIZE
public static final int VERTEX_INT_SIZE- See Also:
-
RESCALE_22_5
private static final float RESCALE_22_5 -
RESCALE_45
private static final float RESCALE_45 -
VERTEX_COUNT
public static final int VERTEX_COUNT- See Also:
-
COLOR_INDEX
private static final int COLOR_INDEX- See Also:
-
UV_INDEX
public static final int UV_INDEX- See Also:
-
-
Constructor Details
-
FaceBakery
public FaceBakery()
-
-
Method Details
-
bakeQuad
public static BakedQuad bakeQuad(Vector3f posFrom, Vector3f posTo, BlockElementFace face, TextureAtlasSprite sprite, Direction facing, ModelState transform, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission) -
recomputeUVs
-
makeVertices
private static int[] makeVertices(BlockFaceUV uvs, TextureAtlasSprite sprite, Direction orientation, float[] posDiv16, Transformation transformation, @Nullable BlockElementRotation partRotation) -
setupShape
-
bakeVertex
private static void bakeVertex(int[] vertexData, int vertexIndex, Direction facing, BlockFaceUV blockFaceUV, float[] posDiv16, TextureAtlasSprite sprite, Transformation transformation, @Nullable BlockElementRotation partRotation) -
fillVertex
private static void fillVertex(int[] vertexData, int vertexIndex, Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) -
applyElementRotation
-
applyModelRotation
-
rotateVertexBy
-
calculateFacing
-
recalculateWinding
-