public class RenderUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FULL_BRIGHT |
| Constructor and Description |
|---|
RenderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
decomposeColor(int color)
Decompose a 32-bit color into ARGB 8-bit int values
|
static float[] |
decomposeColorF(int color) |
static void |
drawTexture(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int x,
int y,
float u1,
float v1,
float u2,
float v2,
int packedLightIn) |
static void |
drawTexture(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int x,
int y,
int packedLightIn) |
static void |
finishBuffer(net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type) |
static com.mojang.blaze3d.vertex.IVertexBuilder |
posF(com.mojang.blaze3d.vertex.IVertexBuilder builder,
net.minecraft.util.math.vector.Matrix4f posMat,
double x,
double y,
double z)
Convenience method to get double coords into
IVertexBuilder#pos(Matrix4f, float, float, float) |
static net.minecraft.client.renderer.RenderType |
renderFrame(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.util.math.AxisAlignedBB aabb,
float fw,
float r,
float g,
float b,
float a,
int packedLightIn,
boolean disableDepthTest,
net.minecraft.util.Direction... sides) |
static void |
renderProgressingLine(ProgressingLine line,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int color) |
static void |
renderProgressingLine(ProgressingLine prev,
ProgressingLine line,
float partialTick,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int color) |
static void |
renderProgressingLineGUI(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
ProgressingLine line,
int color,
float lineWidth)
Render a progressing line in GUI context
|
static void |
renderRing(ProgressingLine line,
ProgressingLine lastLine,
com.mojang.blaze3d.matrix.MatrixStack matrixStackIn,
net.minecraft.client.renderer.IRenderTypeBuffer bufferIn,
float partialTick,
float rotationYaw,
float rotationPitch,
int color) |
static void |
renderString3d(java.lang.String str,
float x,
float y,
int color,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer) |
static void |
renderString3d(java.lang.String str,
float x,
float y,
int color,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
boolean dropShadow,
boolean disableDepthTest) |
static void |
renderWithType(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type,
java.util.function.BiConsumer<net.minecraft.util.math.vector.Matrix4f,com.mojang.blaze3d.vertex.IVertexBuilder> consumer) |
static void |
renderWithTypeAndFinish(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type,
java.util.function.BiConsumer<net.minecraft.util.math.vector.Matrix4f,com.mojang.blaze3d.vertex.IVertexBuilder> consumer) |
static float |
rotateMatrixForDirection(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.util.Direction facing)
Rotates the render matrix dependant on the rotation of a block.
|
static void |
rotateToPlayerFacing(com.mojang.blaze3d.matrix.MatrixStack matrixStack)
Rotate the matrix so that subsequent drawing is oriented toward the player's facing.
|
public static final int FULL_BRIGHT
public static int[] decomposeColor(int color)
color - color to decomposepublic static float[] decomposeColorF(int color)
public static net.minecraft.client.renderer.RenderType renderFrame(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.util.math.AxisAlignedBB aabb,
float fw,
float r,
float g,
float b,
float a,
int packedLightIn,
boolean disableDepthTest,
net.minecraft.util.Direction... sides)
public static float rotateMatrixForDirection(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.util.Direction facing)
matrixStack - the matrix stackfacing - block facing directionpublic static void renderProgressingLineGUI(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
ProgressingLine line,
int color,
float lineWidth)
matrixStack - the matrix stackline - the line to rendercolor - line's colourpublic static void renderProgressingLine(ProgressingLine line, com.mojang.blaze3d.matrix.MatrixStack matrixStack, com.mojang.blaze3d.vertex.IVertexBuilder builder, int color)
public static void renderProgressingLine(ProgressingLine prev, ProgressingLine line, float partialTick, com.mojang.blaze3d.matrix.MatrixStack matrixStack, com.mojang.blaze3d.vertex.IVertexBuilder builder, int color)
public static void renderRing(ProgressingLine line, ProgressingLine lastLine, com.mojang.blaze3d.matrix.MatrixStack matrixStackIn, net.minecraft.client.renderer.IRenderTypeBuffer bufferIn, float partialTick, float rotationYaw, float rotationPitch, int color)
public static void rotateToPlayerFacing(com.mojang.blaze3d.matrix.MatrixStack matrixStack)
matrixStack - the matrix stackpublic static void drawTexture(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int x,
int y,
int packedLightIn)
public static void drawTexture(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
com.mojang.blaze3d.vertex.IVertexBuilder builder,
int x,
int y,
float u1,
float v1,
float u2,
float v2,
int packedLightIn)
public static com.mojang.blaze3d.vertex.IVertexBuilder posF(com.mojang.blaze3d.vertex.IVertexBuilder builder,
net.minecraft.util.math.vector.Matrix4f posMat,
double x,
double y,
double z)
IVertexBuilder#pos(Matrix4f, float, float, float)builder - the vertex builderposMat - the positioning matrixx - Xy - Yz - Zpublic static void finishBuffer(net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type)
public static void renderWithTypeAndFinish(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type,
java.util.function.BiConsumer<net.minecraft.util.math.vector.Matrix4f,com.mojang.blaze3d.vertex.IVertexBuilder> consumer)
public static void renderWithType(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
net.minecraft.client.renderer.RenderType type,
java.util.function.BiConsumer<net.minecraft.util.math.vector.Matrix4f,com.mojang.blaze3d.vertex.IVertexBuilder> consumer)
public static void renderString3d(java.lang.String str,
float x,
float y,
int color,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer)
public static void renderString3d(java.lang.String str,
float x,
float y,
int color,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
net.minecraft.client.renderer.IRenderTypeBuffer buffer,
boolean dropShadow,
boolean disableDepthTest)