Fixed 1.21.5 end cosmetics shader

This commit is contained in:
2026-03-23 19:31:11 +01:00
parent faa18c99ab
commit 7ce54c8561
2 changed files with 21 additions and 2 deletions
@@ -10,7 +10,7 @@ import net.minecraft.util.Identifier;
public class ShaderUtils { public class ShaderUtils {
public static final RenderLayer END_GATEWAY = RenderLayer.of( public static final RenderLayer END_GATEWAY = RenderLayer.of(
"end_gateway_no_cull", "end_gateway",
VertexFormats.POSITION, VertexFormats.POSITION,
DrawMode.QUADS, DrawMode.QUADS,
1536, 1536,
@@ -1,12 +1,31 @@
package org.saturnclient.impl.cosmetics.utils; package org.saturnclient.impl.cosmetics.utils;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderPhase.Textures;
import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
public class ShaderUtils { public class ShaderUtils {
public static final RenderPipeline END_GATEWAY_PIPELINE = RenderPipelines.register(
RenderPipeline.builder(new RenderPipeline.Snippet[] { RenderPipelines.RENDERTYPE_END_PORTAL_SNIPPET })
.withLocation("pipeline/end_gateway")
.withShaderDefine("PORTAL_LAYERS", 16)
.withCull(false)
.build());
public static final RenderLayer END_GATEWAY = RenderLayer.of("end_gateway", 1536, false, false,
END_GATEWAY_PIPELINE,
RenderLayer.MultiPhaseParameters.builder()
.texture(Textures.create().add(EndPortalBlockEntityRenderer.SKY_TEXTURE, false, false)
.add(EndPortalBlockEntityRenderer.PORTAL_TEXTURE, false, false).build())
.build(false));
public static RenderLayer getRenderLayer(Identifier texture) { public static RenderLayer getRenderLayer(Identifier texture) {
if (texture.getPath().endsWith("end.png")) { if (texture.getPath().endsWith("end.png")) {
return RenderLayer.getEndGateway(); return END_GATEWAY;
} else { } else {
return RenderLayer.getEntityAlpha(texture); return RenderLayer.getEntityAlpha(texture);
} }