You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I've been trying to render a line on the screen for a few days now, and everywhere I've looked has outdated answers. They say to use RenderGameOverlayEvent, which has been removed by my understanding. Is there a specific event I should be using or anything else I'm doing wrong?
Tesselator tesselator = Tesselator.getInstance();
BufferBuilder renderer = tesselator.getBuilder();
renderer.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
Color c = new Color(255, 0, 0, 255);
renderer.vertex(0, 100, 0).color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()).endVertex();
renderer.vertex(0, 200, 0).color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()).endVertex();
tesselator.end();
Based on what I've seen, this is the code that should be working, though I feel that I need to override an event and add it in. What event should I be using for this? Is there another way of doing it that I don't know of?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.