Jump to content

mrp_v2

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by mrp_v2

  1. 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()); }
×
×
  • Create New...

Important Information

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