2025-11-24 22:52:51 +03:00

46 lines
1.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* org.joml.Matrix3x2fc
* org.joml.Matrix4f
* org.jspecify.annotations.Nullable
*/
package net.minecraft.client.gui.render.state;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.textures.FilterMode;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.gui.font.TextRenderable;
import net.minecraft.client.gui.navigation.ScreenRectangle;
import net.minecraft.client.gui.render.TextureSetup;
import net.minecraft.client.gui.render.state.GuiElementRenderState;
import org.joml.Matrix3x2fc;
import org.joml.Matrix4f;
import org.jspecify.annotations.Nullable;
public record GlyphRenderState(Matrix3x2fc pose, TextRenderable renderable, @Nullable ScreenRectangle scissorArea) implements GuiElementRenderState
{
@Override
public void buildVertices(VertexConsumer vertexConsumer) {
this.renderable.render(new Matrix4f().mul(this.pose), vertexConsumer, 0xF000F0, true);
}
@Override
public RenderPipeline pipeline() {
return this.renderable.guiPipeline();
}
@Override
public TextureSetup textureSetup() {
return TextureSetup.singleTextureWithLightmap(this.renderable.textureView(), RenderSystem.getSamplerCache().getClampToEdge(FilterMode.NEAREST));
}
@Override
public @Nullable ScreenRectangle bounds() {
return null;
}
}