I recently decided to repeat the example of rendering from fabric docs to play around with, but even though I didn't get any errors, nothing is "drawn" on the screen. I would be very grateful if someone could explain to me what I was doing wrong. (1.21.1 yarn)
Code:
Environment(EnvType.CLIENT)
public class SimpleRender {
public static void render() {
HudRenderCallback.EVENT.register((context, tickDeltaManager) -> {
if(MinecraftClient.getInstance().player != null) {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION);
MatrixStack matrices = context.getMatrices();
matrices.push();
buffer.vertex(100, 100, 100);
buffer.vertex(120, 100, 100);
buffer.vertex(100, 120, 100);
matrices.pop();
}
});
}
}