1.21.11: Fix Splash overlay and shader utils

This commit is contained in:
2026-04-08 09:29:15 +02:00
parent 5aa40d2e61
commit 491199cfea
2 changed files with 4 additions and 3 deletions
@@ -7,6 +7,7 @@ import com.mojang.blaze3d.pipeline.RenderPipeline;
import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderLayers;
import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer;
import net.minecraft.util.Identifier;
@@ -28,12 +29,12 @@ public class ShaderUtils {
public static RenderLayer getRenderLayer(IdentifierRef texture) {
String path = texture.toString();
if (path.endsWith(".gif")) {
return RenderLayer.method_23573((Identifier) (Object) GifUtils.get(texture));
return RenderLayers.entityAlpha((Identifier) (Object) GifUtils.get(texture));
} else if (path.endsWith("end.png")) {
// return END_GATEWAY;
return null;
} else {
return RenderLayer.method_23573((Identifier) (Object) texture);
return RenderLayer.entityAlpha((Identifier) (Object) texture);
}
}
}
@@ -157,7 +157,7 @@ public abstract class SplashOverlayMixin {
if (client.currentScreen != null) {
Window window = this.client.getWindow();
client.currentScreen.method_25423(this.client, window.getScaledWidth(), window.getScaledHeight());
client.currentScreen.init(window.getScaledWidth(), window.getScaledHeight());
}
}
}