1.21.11: Fix Splash overlay and shader utils
This commit is contained in:
+3
-2
@@ -7,6 +7,7 @@ import com.mojang.blaze3d.pipeline.RenderPipeline;
|
|||||||
|
|
||||||
import net.minecraft.client.gl.RenderPipelines;
|
import net.minecraft.client.gl.RenderPipelines;
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
import net.minecraft.client.render.RenderLayers;
|
||||||
import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer;
|
import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
@@ -28,12 +29,12 @@ public class ShaderUtils {
|
|||||||
public static RenderLayer getRenderLayer(IdentifierRef texture) {
|
public static RenderLayer getRenderLayer(IdentifierRef texture) {
|
||||||
String path = texture.toString();
|
String path = texture.toString();
|
||||||
if (path.endsWith(".gif")) {
|
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")) {
|
} else if (path.endsWith("end.png")) {
|
||||||
// return END_GATEWAY;
|
// return END_GATEWAY;
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return RenderLayer.method_23573((Identifier) (Object) texture);
|
return RenderLayer.entityAlpha((Identifier) (Object) texture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -157,7 +157,7 @@ public abstract class SplashOverlayMixin {
|
|||||||
|
|
||||||
if (client.currentScreen != null) {
|
if (client.currentScreen != null) {
|
||||||
Window window = this.client.getWindow();
|
Window window = this.client.getWindow();
|
||||||
client.currentScreen.method_25423(this.client, window.getScaledWidth(), window.getScaledHeight());
|
client.currentScreen.init(window.getScaledWidth(), window.getScaledHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user