#I am pretty lost when it comes to rendering

6 messages · Page 1 of 1 (latest)

signal jetty
#

I am trying to make some rendering stuf, unfortunatly I have little idea what to do.

So I tried
Tessellator tesselator = RenderSystem.renderThreadTesselator();
BufferBuilder b = tesselator.getBuffer();
b.begin(VertexFormat.DrawMode.DEBUG_LINES,
VertexFormats.POSITION);
b.vertex(1, 2, 1);
b.vertex(2, 1, 2);
b.next();
tesselator.draw();

But not much happened
I figure this is supposed to be ran on a loop.
What callback am I supposed to use?
I want to make lines that show up in front of stuff and apear in the minecraft world, meaning I can go around it.

signal jetty
#

Also how can I do this in 1.21??

spring garnet
#

Search fabric api for something like WorldRenderCallback

#

WorldRenderEvents

signal jetty
signal jetty
# spring garnet Search fabric api for something like WorldRenderCallback

Why don't I see anything?

WorldRenderEvents.LAST.register((context)->{
Tessellator tesselator = RenderSystem.renderThreadTesselator();
BufferBuilder b = tesselator.getBuffer();
b.begin(VertexFormat.DrawMode.DEBUG_LINES,
VertexFormats.POSITION);
b.vertex(1, 2, 1);
b.next();
b.vertex(2, 1, 2);
b.next();
b.vertex(3, 1, 2);
b.next();
b.vertex(2, 1, 3);
b.next();
tesselator.draw();
System.out.println("draw");

        });

How do I use it, Would I see it at those cords in the game?