1.21.11: Fix text stuff

This commit is contained in:
2026-04-08 09:30:39 +02:00
parent 491199cfea
commit 0475d8c43d
3 changed files with 19 additions and 15 deletions
@@ -12,19 +12,23 @@ 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 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)
// .add(EndPortalBlockEntityRenderer.PORTAL_TEXTURE, false).build())
// .build(false));
// 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)
// .add(EndPortalBlockEntityRenderer.PORTAL_TEXTURE, false).build())
// .build(false));
public static RenderLayer getRenderLayer(IdentifierRef texture) {
String path = texture.toString();
@@ -34,7 +38,7 @@ public class ShaderUtils {
// return END_GATEWAY;
return null;
} else {
return RenderLayer.entityAlpha((Identifier) (Object) texture);
return RenderLayers.entityAlpha((Identifier) (Object) texture);
}
}
}
@@ -15,7 +15,7 @@ public interface TextMixin extends TextRef {
@Override
public default TextRef withFont(IdentifierRef font) {
return (TextRef) (((Text) this).copy().setStyle(Style.EMPTY.withFont(new Font((Identifier) (Object) font))));
return (TextRef) (Text) (((Text) this).copy().setStyle(Style.EMPTY.withFont(new Font((Identifier) (Object) font))));
}
@Override
@@ -20,6 +20,6 @@ public class RefConstructorImpl implements RefConstructorProvider {
@Override
public TextRef text(String text) {
return (TextRef) Text.literal(text);
return (TextRef) (Text) Text.literal(text);
}
}