Package info.u_team.u_team_core.util
Klasse RenderUtil
java.lang.Object
info.u_team.u_team_core.util.RenderUtil
Utility methods for rendering
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidaddColoredQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, RGBA color, float blitOffset) Adds a quad to the buffer builder.static voidaddQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float blitOffset) Adds a quad to the buffer builder.static voidaddTexturedQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float u1, float u2, float v1, float v2, float blitOffset) Adds a textured quad to the buffer builder.static voidaddTexturedRect(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int u, int v, float uScale, float vScale, int width, int height, float blitOffset) Adds a textured rectangle to the buffer builder.static voiddrawContainerBorder(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, float blitOffset, RGBA color) Draws the default container borderstatic voiddrawContinuousTexturedBox(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.static voiddrawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float u1, float u2, float v1, float v2, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured quad.static voiddrawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, float blitOffset, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, RGBA color) Draws a textured quad.static voiddrawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, int uWidth, int vHeight, float uOffset, float vOffset, int textureWidth, int textureHeight, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured quad.static voidSets the shader color toRGBA.WHITEstatic voidsetShaderColor(RGBA rgba) Sets the shader color fromRGBAtype
-
Felddetails
-
DARK_CONTAINER_BORDER_COLOR
-
MEDIUM_CONTAINER_BORDER_COLOR
-
BRIGHT_CONTAINER_BORDER_COLOR
-
-
Konstruktordetails
-
RenderUtil
public RenderUtil()
-
-
Methodendetails
-
drawContainerBorder
public static void drawContainerBorder(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, float blitOffset, RGBA color) Draws the default container border- Parameter:
poseStack- Pose stackx- X coordinatey- Y coordinatewidth- Widthheight- HeightblitOffset- zLevel for drawingcolor- The shader color. If usingRGBA.WHITEthen the drawing will not be colored
-
drawContinuousTexturedBox
public static void drawContinuousTexturedBox(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.- Parameter:
poseStack- Pose stackx- X coordinatey- Y coordinateu- U coordinatev- V coordinatewidth- Widthheight- HeighttextureWidth- Texture widthtextureHeight- Texture heighttopBorder- Top borderbottomBorder- Bottom borderleftBorder- Left borderrightBorder- Right borderblitOffset- zLevel for drawingtexture- Texture locationcolor- The shader color. If usingRGBA.WHITEthen the image will not be colored
-
drawTexturedQuad
public static void drawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, int uWidth, int vHeight, float uOffset, float vOffset, int textureWidth, int textureHeight, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured quad.- Parameter:
poseStack- Pose stackx- X coordinatey- Y coordinatewidth- Widthheight- HeightuWidth- U WidthvHeight- V HeightuOffset- U OffsetvOffset- V OffsettextureWidth- Texture widthtextureHeight- Texture heightblitOffset- zLevel for drawingtexture- Texture locationcolor- The shader color. If usingRGBA.WHITEthen the image will not be colored
-
drawTexturedQuad
public static void drawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int width, int height, float blitOffset, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, RGBA color) Draws a textured quad.- Parameter:
poseStack- Pose stackx- X coordinatey- Y coordinatewidth- Widthheight- HeightblitOffset- zLevel for drawingsprite- Texture sprite from texture atlascolor- The shader color. If usingRGBA.WHITEthen the image will not be colored
-
drawTexturedQuad
public static void drawTexturedQuad(com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float u1, float u2, float v1, float v2, float blitOffset, net.minecraft.resources.ResourceLocation texture, RGBA color) Draws a textured quad.- Parameter:
poseStack- Pose stackx1- X1 coordinatex2- X2 coordinatey1- Y1 coordinatey2- Y2 coordinateu1- U1 coordinateu2- U2 coordinatev1- V1 coordinatev2- V2 coordinateblitOffset- zLevel for drawingtexture- Texture locationcolor- The shader color. If usingRGBA.WHITEthen the image will not be colored
-
addTexturedRect
public static void addTexturedRect(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x, int y, int u, int v, float uScale, float vScale, int width, int height, float blitOffset) Adds a textured rectangle to the buffer builder. The vertex format must beDefaultVertexFormat.POSITION_TEXand the draw format must beVertexFormat.Mode.QUADS- Parameter:
bufferBuilder- Buffer builderposeStack- Pose stackx- X coordinatey- Y coordinateu- U coordinatev- V coordinateuScale- U scalevScale- V scalewidth- Widthheight- HeightblitOffset- zLevel for drawing
-
addTexturedQuad
public static void addTexturedQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float u1, float u2, float v1, float v2, float blitOffset) Adds a textured quad to the buffer builder. The vertex format must beDefaultVertexFormat.POSITION_TEXand the draw format must beVertexFormat.Mode.QUADS- Parameter:
bufferBuilder- Buffer builderposeStack- Pose stackx1- X1 coordinatex2- X2 coordinatey1- Y1 coordinatey2- Y2 coordinateu1- U1 coordinateu2- U2 coordinatev1- V1 coordinatev2- V2 coordinateblitOffset- zLevel for drawing
-
addColoredQuad
public static void addColoredQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, RGBA color, float blitOffset) Adds a quad to the buffer builder. The vertex format must beDefaultVertexFormat.POSITION_COLORand the draw format must beVertexFormat.Mode.QUADS- Parameter:
bufferBuilder- Buffer builderposeStack- Pose stackx1- X1 coordinatex2- X2 coordinatey1- Y1 coordinatey2- Y2 coordinatecolor- Color of the verticesblitOffset- zLevel for drawing
-
addQuad
public static void addQuad(com.mojang.blaze3d.vertex.BufferBuilder bufferBuilder, com.mojang.blaze3d.vertex.PoseStack poseStack, int x1, int x2, int y1, int y2, float blitOffset) Adds a quad to the buffer builder. The vertex format must beDefaultVertexFormat.POSITIONand the draw format must beVertexFormat.Mode.QUADS- Parameter:
bufferBuilder- Buffer builderposeStack- Pose stackx1- X1 coordinatex2- X2 coordinatey1- Y1 coordinatey2- Y2 coordinateblitOffset- zLevel for drawing
-
setShaderColor
Sets the shader color fromRGBAtype- Parameter:
rgba- Color
-
resetShaderColor
public static void resetShaderColor()Sets the shader color toRGBA.WHITE
-