Files
CatServer/patches/net/minecraft/client/shader/ShaderLoader.java.patch
2019-02-24 22:29:41 +08:00

35 lines
1.5 KiB
Diff

--- ../src-base/minecraft/net/minecraft/client/shader/ShaderLoader.java
+++ ../src-work/minecraft/net/minecraft/client/shader/ShaderLoader.java
@@ -20,12 +20,12 @@
@SideOnly(Side.CLIENT)
public class ShaderLoader
{
- private final ShaderLoader.ShaderType shaderType;
+ private final ShaderType shaderType;
private final String shaderFilename;
private final int shader;
private int shaderAttachCount;
- private ShaderLoader(ShaderLoader.ShaderType type, int shaderId, String filename)
+ private ShaderLoader(ShaderType type, int shaderId, String filename)
{
this.shaderType = type;
this.shader = shaderId;
@@ -54,13 +54,14 @@
return this.shaderFilename;
}
- public static ShaderLoader loadShader(IResourceManager resourceManager, ShaderLoader.ShaderType type, String filename) throws IOException
+ public static ShaderLoader loadShader(IResourceManager resourceManager, ShaderType type, String filename) throws IOException
{
ShaderLoader shaderloader = (ShaderLoader)type.getLoadedShaders().get(filename);
if (shaderloader == null)
{
- ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + filename + type.getShaderExtension());
+ String[] rl = ResourceLocation.splitObjectName(filename);
+ ResourceLocation resourcelocation = new ResourceLocation(rl[0], "shaders/program/" + rl[1] + type.getShaderExtension());
IResource iresource = resourceManager.getResource(resourcelocation);
try