Class FaceBakery
java.lang.Object
net.minecraft.client.renderer.block.model.FaceBakery
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final float
private static final float
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyElementRotation
(org.joml.Vector3f vec, BlockElementRotation partRotation) void
applyModelRotation
(org.joml.Vector3f pos, Transformation transform) bakeQuad
(org.joml.Vector3f posFrom, org.joml.Vector3f posTo, BlockElementFace face, TextureAtlasSprite sprite, Direction facing, ModelState transform, BlockElementRotation rotation, boolean shade) private void
bakeVertex
(int[] vertexData, int vertexIndex, Direction facing, BlockFaceUV blockFaceUV, float[] posDiv16, TextureAtlasSprite sprite, Transformation rotation, BlockElementRotation partRotation, boolean shade) static Direction
calculateFacing
(int[] faceData) private void
fillVertex
(int[] vertexData, int vertexIndex, org.joml.Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) private int[]
makeVertices
(BlockFaceUV uvs, TextureAtlasSprite sprite, Direction orientation, float[] posDiv16, Transformation rotation, BlockElementRotation partRotation, boolean shade) private void
recalculateWinding
(int[] vertices, Direction direction) static BlockFaceUV
recomputeUVs
(BlockFaceUV uv, Direction facing, Transformation rotation) private void
rotateVertexBy
(org.joml.Vector3f pos, org.joml.Vector3f origin, org.joml.Matrix4f transform, org.joml.Vector3f scale) private float[]
setupShape
(org.joml.Vector3f min, org.joml.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 BakedQuad bakeQuad(org.joml.Vector3f posFrom, org.joml.Vector3f posTo, BlockElementFace face, TextureAtlasSprite sprite, Direction facing, ModelState transform, @Nullable BlockElementRotation rotation, boolean shade) -
recomputeUVs
-
makeVertices
private int[] makeVertices(BlockFaceUV uvs, TextureAtlasSprite sprite, Direction orientation, float[] posDiv16, Transformation rotation, @Nullable BlockElementRotation partRotation, boolean shade) -
setupShape
private float[] setupShape(org.joml.Vector3f min, org.joml.Vector3f max) -
bakeVertex
private void bakeVertex(int[] vertexData, int vertexIndex, Direction facing, BlockFaceUV blockFaceUV, float[] posDiv16, TextureAtlasSprite sprite, Transformation rotation, @Nullable BlockElementRotation partRotation, boolean shade) -
fillVertex
private void fillVertex(int[] vertexData, int vertexIndex, org.joml.Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) -
applyElementRotation
private void applyElementRotation(org.joml.Vector3f vec, @Nullable BlockElementRotation partRotation) -
applyModelRotation
-
rotateVertexBy
private void rotateVertexBy(org.joml.Vector3f pos, org.joml.Vector3f origin, org.joml.Matrix4f transform, org.joml.Vector3f scale) -
calculateFacing
-
recalculateWinding
-