Class FaceBakery
java.lang.Object
net.minecraft.client.renderer.block.model.FaceBakery
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidapplyElementRotation(Vector3f pVec, BlockElementRotation pPartRotation) private static voidapplyModelRotation(Vector3f pPos, Transformation pTransform) static BakedQuadbakeQuad(Vector3fc pPosFrom, Vector3fc pPosTo, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pFacing, ModelState pModelState, BlockElementRotation pRotation, boolean pShade, int pLightEmission) private static voidbakeVertex(int[] pVertexData, int pVertexIndex, FaceInfo pFaceInfo, BlockElementFace.UVs pUvs, Quadrant pRotation, Matrix4fc pInverseFaceTransform, float[] pShape, TextureAtlasSprite pSprite, Transformation pTransformation, BlockElementRotation pPartRotation) private static DirectioncalculateFacing(int[] pFaceData) private static floatcenterToCorner(float pCoord) private static Vector3fccomputeRescale(BlockElementRotation pPartRotation) private static floatcornerToCenter(float pCoord) static BlockElementFace.UVsdefaultFaceUV(Vector3fc pPosFrom, Vector3fc pPosTo, Direction pFacing) static voidextractPositions(int[] pFaceData, Consumer<Vector3f> pOutput) private static voidfillVertex(int[] pVertexData, int pVertexIndex, Vector3f pPos, TextureAtlasSprite pSprite, float pU, float pV) private static int[]makeVertices(BlockElementFace.UVs pUvs, Quadrant pRotation, Matrix4fc pInverseFaceTransform, TextureAtlasSprite pSprite, Direction pFacing, float[] pShape, Transformation pTransformation, BlockElementRotation pPartRotation) private static voidrecalculateWinding(int[] pVertices, Direction pDirection) private static voidrotateVertexBy(Vector3f pPos, Vector3fc pOrigin, Matrix4fc pTransform, Vector3fc pScale) private static float[]setupShape(Vector3fc pPosFrom, Vector3fc pPosTo) private static BlockElementFace.UVsshrinkUVs(TextureAtlasSprite pSprite, BlockElementFace.UVs pUvs) private static Vector3fvectorFromData(int[] pFaceData, int pIndex) private static floatxFromData(int[] pFaceData, int pIndex) private static floatyFromData(int[] pFaceData, int pIndex) private static floatzFromData(int[] pFaceData, int pIndex)
-
Field Details
-
VERTEX_INT_SIZE
public static final int VERTEX_INT_SIZE- See Also:
-
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:
-
NO_RESCALE
-
BLOCK_MIDDLE
-
-
Constructor Details
-
FaceBakery
public FaceBakery()
-
-
Method Details
-
defaultFaceUV
public static BlockElementFace.UVs defaultFaceUV(Vector3fc pPosFrom, Vector3fc pPosTo, Direction pFacing) -
bakeQuad
public static BakedQuad bakeQuad(Vector3fc pPosFrom, Vector3fc pPosTo, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pFacing, ModelState pModelState, @Nullable BlockElementRotation pRotation, boolean pShade, int pLightEmission) -
shrinkUVs
private static BlockElementFace.UVs shrinkUVs(TextureAtlasSprite pSprite, BlockElementFace.UVs pUvs) -
makeVertices
private static int[] makeVertices(BlockElementFace.UVs pUvs, Quadrant pRotation, Matrix4fc pInverseFaceTransform, TextureAtlasSprite pSprite, Direction pFacing, float[] pShape, Transformation pTransformation, @Nullable BlockElementRotation pPartRotation) -
setupShape
-
bakeVertex
private static void bakeVertex(int[] pVertexData, int pVertexIndex, FaceInfo pFaceInfo, BlockElementFace.UVs pUvs, Quadrant pRotation, Matrix4fc pInverseFaceTransform, float[] pShape, TextureAtlasSprite pSprite, Transformation pTransformation, @Nullable BlockElementRotation pPartRotation) -
cornerToCenter
private static float cornerToCenter(float pCoord) -
centerToCorner
private static float centerToCorner(float pCoord) -
fillVertex
private static void fillVertex(int[] pVertexData, int pVertexIndex, Vector3f pPos, TextureAtlasSprite pSprite, float pU, float pV) -
applyElementRotation
private static void applyElementRotation(Vector3f pVec, @Nullable BlockElementRotation pPartRotation) -
computeRescale
-
applyModelRotation
-
rotateVertexBy
-
calculateFacing
-
xFromData
private static float xFromData(int[] pFaceData, int pIndex) -
yFromData
private static float yFromData(int[] pFaceData, int pIndex) -
zFromData
private static float zFromData(int[] pFaceData, int pIndex) -
vectorFromData
-
recalculateWinding
-
extractPositions
-