Fixed 1.21.5 end cosmetics shader
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ import net.minecraft.util.Identifier;
|
||||
|
||||
public class ShaderUtils {
|
||||
public static final RenderLayer END_GATEWAY = RenderLayer.of(
|
||||
"end_gateway_no_cull",
|
||||
"end_gateway",
|
||||
VertexFormats.POSITION,
|
||||
DrawMode.QUADS,
|
||||
1536,
|
||||
|
||||
+20
-1
@@ -1,12 +1,31 @@
|
||||
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.RenderPhase.Textures;
|
||||
import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
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) {
|
||||
if (texture.getPath().endsWith("end.png")) {
|
||||
return RenderLayer.getEndGateway();
|
||||
return END_GATEWAY;
|
||||
} else {
|
||||
return RenderLayer.getEntityAlpha(texture);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user