More Overlays Updated

More Overlays Updated

27M Downloads

RenderSystem update

Closed this issue ยท 1 comments

commented

1.21.5 overhauls the render system. By throwing out JEI and making some changes I got it to mostly work for my own use. Some RenderSystem calls need to be replaced by GlStateManager, .setShader gets thrown out completely, instead use a RenderType to draw the meshData. I didn't find a RenderType that worked, so I made a custom one.

public static RenderType.CompositeRenderType LightOverlay = RenderType.create("light_overlay_lines", 256, RenderPipeline.builder() .withVertexShader("core/position_color") .withLocation("position_color") .withFragmentShader("core/position_color") .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.DEBUG_LINES) .withCull(false) .build(), RenderType.CompositeState.builder() .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(1.0))) .createCompositeState(false));

I don't need REI/JEI, so I haven't tried to get that compatible.

commented

Thank you! This saved me a lot of time.