src/main/java/dev/lambdaurora/spruceui/util/RenderUtil.java
public static void renderBackgroundTexture(int x, int y, int width, int height, float vOffset,
                                               int red, int green, int blue, int alpha) {
        var tessellator = Tessellator.getInstance();
        var bufferBuilder = tessellator.getBuffer();
        RenderSystem.setShader(GameRenderer::getPositionTexColorShader);
        RenderSystem.setShaderColor(1.f, 1.f, 1.f, 1.f);
        RenderSystem.setShaderTexture(0, Screen.OPTIONS_BACKGROUND_TEXTURE);

        int right = x + width;
        int bottom = y + height;

        bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
        bufferBuilder.vertex(x, bottom, 0)
                .texture(0, bottom / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(right, bottom, 0)
                .texture(right / 32.f, bottom / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(right, y, 0)
                .texture(right / 32.f, y / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(x, y, 0)
                .texture(0, y / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        tessellator.draw();
    }
/**
     * Renders the dirt background texture.
     *
     * @param x the X-coordinate
     * @param y the Y-coordinate
     * @param width the width
     * @param height the height
     * @param vOffset the v offset
     * @param red the red-component color value
     * @param green the green-component color value
     * @param blue the blue-component color value
     * @param alpha the alpha-component alpha value
     */
Renders the dirt background texture.
Renders the dirt background texture .
public static void renderBackgroundTexture(int x, int y, int width, int height, float vOffset,
                                               int red, int green, int blue, int alpha) {
        var tessellator = Tessellator.getInstance();
        var bufferBuilder = tessellator.getBuffer();
        RenderSystem.setShader(GameRenderer::getPositionTexColorShader);
        RenderSystem.setShaderColor(1.f, 1.f, 1.f, 1.f);
        RenderSystem.setShaderTexture(0, Screen.OPTIONS_BACKGROUND_TEXTURE);
        int right = x + width;
        int bottom = y + height;
        bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
        bufferBuilder.vertex(x, bottom, 0)
                .texture(0, bottom / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(right, bottom, 0)
                .texture(right / 32.f, bottom / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(right, y, 0)
                .texture(right / 32.f, y / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        bufferBuilder.vertex(x, y, 0)
                .texture(0, y / 32.f + vOffset)
                .color(red, green, blue, alpha).next();
        tessellator.draw();
    }
public static void renderBackgroundTexture ( int x , int y , int width , int height , float vOffset , int red , int green , int blue , int alpha ) { var tessellator = Tessellator . getInstance ( ) ; var bufferBuilder = tessellator . getBuffer ( ) ; RenderSystem . setShader ( GameRenderer :: getPositionTexColorShader ) ; RenderSystem . setShaderColor ( 1.f , 1.f , 1.f , 1.f ) ; RenderSystem . setShaderTexture ( 0 , Screen . OPTIONS_BACKGROUND_TEXTURE ) ; int right = x + width ; int bottom = y + height ; bufferBuilder . begin ( VertexFormat . DrawMode . QUADS , VertexFormats . POSITION_TEXTURE_COLOR ) ; bufferBuilder . vertex ( x , bottom , 0 ) . texture ( 0 , bottom / 32.f + vOffset ) . color ( red , green , blue , alpha ) . next ( ) ; bufferBuilder . vertex ( right , bottom , 0 ) . texture ( right / 32.f , bottom / 32.f + vOffset ) . color ( red , green , blue , alpha ) . next ( ) ; bufferBuilder . vertex ( right , y , 0 ) . texture ( right / 32.f , y / 32.f + vOffset ) . color ( red , green , blue , alpha ) . next ( ) ; bufferBuilder . vertex ( x , y , 0 ) . texture ( 0 , y / 32.f + vOffset ) . color ( red , green , blue , alpha ) . next ( ) ; tessellator . draw ( ) ; }
Renders the dirt background texture.
Renders the dirt background texture .