Fixed background ponies not loading due to different case

This commit is contained in:
Sollace 2018-11-02 14:34:50 +02:00
parent db14308a0c
commit 347f2b44c1
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,23 @@
package com.minelittlepony;
import net.minecraft.util.ResourceLocation;
public class CasedResourceLocation extends ResourceLocation {
protected final String casedPath;
public CasedResourceLocation(String domain, String path) {
super(domain, path);
casedPath = path;
}
@Override
public String getPath() {
return casedPath;
}
@Override
public String toString() {
return namespace + ':' + casedPath;
}
}

View file

@ -198,7 +198,7 @@ public class PonyManager implements IResourceManagerReloadListener, ISkinCacheCl
} }
private ResourceLocation apply(String input) { private ResourceLocation apply(String input) {
return new ResourceLocation("minelittlepony", String.format("textures/entity/pony/%s.png", input)); return new CasedResourceLocation("minelittlepony", String.format("textures/entity/pony/%s.png", input));
} }
public List<ResourceLocation> getPonies() { public List<ResourceLocation> getPonies() {