@Environment(value=CLIENT)
public final class RenderUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
maxLight
Passing this value as the
light parameter to any of the functions
in this class makes the rendered quad ignore daylight. |
| Modifier and Type | Method and Description |
|---|---|
static void |
bindTexture(net.minecraft.util.Identifier location)
Bind the texture at the specified location to be used for quad rendering.
|
static void |
drawColorQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
int argb,
int light,
int overlay)
Draw a full one-by-one, textureless, colored quad.
|
static void |
drawColorQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
int a,
int r,
int g,
int b,
int l,
int ol)
Draw a full one-by-one, textureless, colored quad.
|
static void |
drawQuad()
Draw a full one-by-one quad.
|
static void |
drawQuad(float u0,
float v0,
float u1,
float v1)
Draw a full one-by-one quad with the specified texture coordinates.
|
static void |
drawQuad(float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1)
Draw an arbitrarily sized quad with the specified texture coordinates.
|
static void |
drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int light,
int overlay)
Draw an arbitrarily sized quad with the specified texture coordinates and texture.
|
static void |
drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int argb,
int light,
int overlay)
Draw an arbitrarily sized colored quad with the specified texture coordinates and texture.
|
static void |
drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int a,
int r,
int g,
int b,
int light,
int overlay)
Draw an arbitrarily sized colored quad with the specified texture coordinates.
|
static void |
drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int light,
int overlay)
Draw a full one-by-one quad.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite)
Draw a full one-by-one quad with the specified sprite texture.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite,
float u0,
float v0,
float u1,
float v1)
Draw a full one-by-one quad with the specified texture coordinates and sprite texture.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1)
Draw an arbitrarily sized quad with the specified texture coordinates and texture.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int light,
int overlay)
Draw an arbitrarily sized quad with the specified texture coordinates and texture.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int light,
int overlay)
Draw a full one-by-one quad with the specified sprite texture.
|
static void |
drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int a,
int r,
int g,
int b,
int light,
int overlay)
Draw a full one-by-one colored quad with the specified sprite texture.
|
static void |
drawUntexturedQuad(float x,
float y,
float w,
float h)
Draw a full one-by-one, untextured quad.
|
static net.minecraft.client.texture.Sprite |
getSprite(net.minecraft.util.Identifier location)
Get the texture atlas sprite for the specified texture loaded into the
block texture map.
|
static void |
ignoreLighting()
Configure the light map so that whatever is rendered next is rendered at
full brightness, regardless of environment brightness.
|
public static final int maxLight
light parameter to any of the functions
in this class makes the rendered quad ignore daylight.public static void bindTexture(net.minecraft.util.Identifier location)
location - the location of the texture to bind.public static net.minecraft.client.texture.Sprite getSprite(net.minecraft.util.Identifier location)
location - the location of the texture to get the sprite for.missingno if not found.public static void drawUntexturedQuad(float x,
float y,
float w,
float h)
x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.public static void drawColorQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
int argb,
int light,
int overlay)
matrices - the model/normal matrix pair to applyvc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.argb - the color in unsigned ARGB format.light - the light value.overlay - the overlay value.public static void drawColorQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
int a,
int r,
int g,
int b,
int l,
int ol)
Color components are in the [0, 255] range.
matrices - the model/normal matrix pair to applyvc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.a - the alpha color component.r - the red color component.g - the green color component.b - the blue color component.l - the light value.ol - the overlay value.public static void drawQuad(float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1)
x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.public static void drawQuad(float u0,
float v0,
float u1,
float v1)
u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.public static void drawQuad()
public static void drawQuad(net.minecraft.client.texture.Sprite sprite,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1)
The UV coordinates are relative to the sprite.
sprite - the sprite to render.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.public static void drawQuad(net.minecraft.client.texture.Sprite sprite,
float u0,
float v0,
float u1,
float v1)
The UV coordinates are relative to the sprite.
sprite - the sprite to render.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.public static void drawQuad(net.minecraft.client.texture.Sprite sprite)
sprite - the sprite to render.public static void drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int a,
int r,
int g,
int b,
int light,
int overlay)
Color components are in the [0, 255] range.
matrices - the transformation.vc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.a - the alpha color component.r - the red color component.g - the green color component.b - the blue color component.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int light,
int overlay)
matrices - the transformation.vc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int argb,
int light,
int overlay)
matrices - the transformation.vc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.argb - the color in unsigned ARGB format.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
float x,
float y,
float w,
float h,
float u0,
float v0,
float u1,
float v1,
int light,
int overlay)
The UV coordinates are relative to the sprite.
sprite - the sprite to render.matrices - the transformation.vc - a VertexConsumer accepting all standard elements.x - the x position of the quad.y - the y position of the quad.w - the width of the quad.h - the height of the quad.u0 - lower u texture coordinate.v0 - lower v texture coordinate.u1 - upper u texture coordinate.v1 - upper v texture coordinate.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int a,
int r,
int g,
int b,
int light,
int overlay)
Color components are in the [0, 255] range.
sprite - the sprite to render.matrices - the transformation.vc - a VertexConsumer accepting all standard elements.a - the alpha color component.r - the red color component.g - the green color component.b - the blue color component.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.texture.Sprite sprite,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int light,
int overlay)
sprite - the sprite to render.matrices - the transformation.vc - a VertexConsumer accepting all standard elements.light - the light value.overlay - the overlay value.public static void drawQuad(net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int light,
int overlay)
matrices - the transformation.vc - a VertexConsumer accepting all standard elements.light - the light value.overlay - the overlay value.public static void ignoreLighting()