@@ -30,18 +30,16 @@ public class RenderQueue {
3030 private static final List <RemoveQueueEntry > removeQueue = new ArrayList <>();
3131 private static final EnumMap <Layer , Map <Object , Shape >> queue = new EnumMap <>(Layer .class );
3232
33- private static final RenderPipeline NO_DEPTH_PIPELINE = RenderPipeline .builder (RenderPipelines .MATRICES_COLOR_SNIPPET )
34- .withLocation (ResourceLocation .fromNamespaceAndPath ("clientcommands" , "pipeline/no_depth" ))
35- .withVertexShader ("core/position_color" )
36- .withFragmentShader ("core/position_color" )
37- .withCull (false )
38- .withDepthTestFunction (DepthTestFunction .NO_DEPTH_TEST )
39- .withVertexFormat (DefaultVertexFormat .POSITION_COLOR , VertexFormat .Mode .DEBUG_LINE_STRIP )
40- .build ();
41- public static final RenderType NO_DEPTH_LAYER = RenderType .create ("clientcommands_no_depth" , 3 * 512 , NO_DEPTH_PIPELINE , RenderType .CompositeState .builder ()
33+ private static final RenderPipeline LINES_NO_DEPTH_PIPELINE = RenderPipelines .register (
34+ RenderPipeline .builder (RenderPipelines .LINES_SNIPPET )
35+ .withLocation (ResourceLocation .fromNamespaceAndPath ("clientcommands" , "pipeline/lines_no_depth" ))
36+ .withDepthTestFunction (DepthTestFunction .NO_DEPTH_TEST )
37+ .build ()
38+ );
39+ public static final RenderType LINES_NO_DEPTH_LAYER = RenderType .create ("clientcommands_no_depth" , 3 * 512 , LINES_NO_DEPTH_PIPELINE , RenderType .CompositeState .builder ()
4240 .setLayeringState (RenderType .VIEW_OFFSET_Z_LAYERING )
4341 .setLineState (new RenderType .LineStateShard (OptionalDouble .of (Line .THICKNESS )))
44- .createCompositeState (true ));
42+ .createCompositeState (false ));
4543
4644 static {
4745 ClientTickEvents .START_CLIENT_TICK .register (RenderQueue ::tick );
@@ -50,12 +48,10 @@ public class RenderQueue {
5048
5149 Vec3 cameraPos = context .camera ().getPosition ();
5250 context .matrixStack ().translate (-cameraPos .x , -cameraPos .y , -cameraPos .z );
53- RenderQueue .render (RenderQueue .Layer .ON_TOP , Objects .requireNonNull (context .consumers ()).getBuffer (RenderQueue .NO_DEPTH_LAYER ), context .matrixStack (), context .tickCounter ().getRealtimeDeltaTicks ());
51+ RenderQueue .render (RenderQueue .Layer .ON_TOP , Objects .requireNonNull (context .consumers ()).getBuffer (RenderQueue .LINES_NO_DEPTH_LAYER ), context .matrixStack (), context .tickCounter ().getRealtimeDeltaTicks ());
5452
5553 context .matrixStack ().popPose ();
5654 });
57-
58- RenderPipelines .register (NO_DEPTH_PIPELINE );
5955 }
6056
6157 public static void register () {
0 commit comments