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 pVec, BlockElementRotation pPartRotation) void
applyModelRotation
(org.joml.Vector3f pPos, Transformation pTransform) bakeQuad
(org.joml.Vector3f pPosFrom, org.joml.Vector3f pPosTo, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pFacing, ModelState pTransform, BlockElementRotation pRotation, boolean pShade) private void
bakeVertex
(int[] pVertexData, int pVertexIndex, Direction pFacing, BlockFaceUV pBlockFaceUV, float[] pPosDiv16, TextureAtlasSprite pSprite, Transformation pRotation, BlockElementRotation pPartRotation, boolean pShade) static Direction
calculateFacing
(int[] pFaceData) private void
fillVertex
(int[] pVertexData, int pVertexIndex, org.joml.Vector3f pVector, TextureAtlasSprite pSprite, BlockFaceUV pBlockFaceUV) private int[]
makeVertices
(BlockFaceUV pUvs, TextureAtlasSprite pSprite, Direction pOrientation, float[] pPosDiv16, Transformation pRotation, BlockElementRotation pPartRotation, boolean pShade) private void
recalculateWinding
(int[] pVertices, Direction pDirection) static BlockFaceUV
recomputeUVs
(BlockFaceUV pUv, Direction pFacing, Transformation pRotation) private void
rotateVertexBy
(org.joml.Vector3f pPos, org.joml.Vector3f pOrigin, org.joml.Matrix4f pTransform, org.joml.Vector3f pScale) private float[]
setupShape
(org.joml.Vector3f pMin, org.joml.Vector3f pMax)
-
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 pPosFrom, org.joml.Vector3f pPosTo, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pFacing, ModelState pTransform, @Nullable BlockElementRotation pRotation, boolean pShade) -
recomputeUVs
public static BlockFaceUV recomputeUVs(BlockFaceUV pUv, Direction pFacing, Transformation pRotation) -
makeVertices
private int[] makeVertices(BlockFaceUV pUvs, TextureAtlasSprite pSprite, Direction pOrientation, float[] pPosDiv16, Transformation pRotation, @Nullable BlockElementRotation pPartRotation, boolean pShade) -
setupShape
private float[] setupShape(org.joml.Vector3f pMin, org.joml.Vector3f pMax) -
bakeVertex
private void bakeVertex(int[] pVertexData, int pVertexIndex, Direction pFacing, BlockFaceUV pBlockFaceUV, float[] pPosDiv16, TextureAtlasSprite pSprite, Transformation pRotation, @Nullable BlockElementRotation pPartRotation, boolean pShade) -
fillVertex
private void fillVertex(int[] pVertexData, int pVertexIndex, org.joml.Vector3f pVector, TextureAtlasSprite pSprite, BlockFaceUV pBlockFaceUV) -
applyElementRotation
private void applyElementRotation(org.joml.Vector3f pVec, @Nullable BlockElementRotation pPartRotation) -
applyModelRotation
-
rotateVertexBy
private void rotateVertexBy(org.joml.Vector3f pPos, org.joml.Vector3f pOrigin, org.joml.Matrix4f pTransform, org.joml.Vector3f pScale) -
calculateFacing
-
recalculateWinding
-