mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 14:27:59 +01:00
Fixed background ponies not loading due to different case
This commit is contained in:
parent
db14308a0c
commit
347f2b44c1
2 changed files with 24 additions and 1 deletions
23
src/main/java/com/minelittlepony/CasedResourceLocation.java
Normal file
23
src/main/java/com/minelittlepony/CasedResourceLocation.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue