Jump to content

[1.16.1] Fabulous Graphics Doesn't Render Lines


mrp_v2

Recommended Posts

I have a mod that draws lines in the world, and everything works fine with Fast or Fancy graphics. However, with Fabulous graphics, no lines render at all. I've tried to look for the differences between Fabulous and Fancy graphics, but I can't find anything that looks useful. Anyone know why something that renders with Fancy graphics wouldn't render with Fabulous graphics?

Example code:

@SubscribeEvent
public static void renderEvent(RenderWorldLastEvent event) {
	@SuppressWarnings("resource")
	PlayerEntity player = Minecraft.getInstance().player;
  	Vector3d playerPos = player.getEyePosition(event.getPartialTicks());
  	//used to use lightning, but now uses a custom render type that is a mix of lightning and transparency
  	IVertexBuilder builder = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource().getBuffer(RenderType.getLightning());
  	event.getMatrixStack().push();
  	event.getMatrixStack().translate(-playerPos.x, -playerPos.y, -playerPos.z);
  	Matrix4f matrix = event.getMatrixStack().getLast().getMatrix();
  	//example draw - makes a squre
  	builder.pos(matrix, 0, 70, 0).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 1, 70, 0).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 1, 70, 1).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 0, 70, 1).color(255, 255, 255, 255).endVertex();
  	//end draw
  	event.getMatrixStack().pop();
  	Minecraft.getInstance().getRenderTypeBuffers().getBufferSource().finish(RenderType.getLightning());
}

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.