Working cosmetic id mtl loader
This commit is contained in:
@@ -27,6 +27,7 @@ public class MtlLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, Mtl> of(Identifier mtlId) {
|
public static Map<String, Mtl> of(Identifier mtlId) {
|
||||||
|
System.out.println(mtlId);
|
||||||
if (loadedMtls.containsKey(mtlId))
|
if (loadedMtls.containsKey(mtlId))
|
||||||
return loadedMtls.get(mtlId);
|
return loadedMtls.get(mtlId);
|
||||||
|
|
||||||
@@ -44,10 +45,12 @@ public class MtlLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, Mtl> cosmetic(String cosmeticId) {
|
public static Map<String, Mtl> cosmetic(String cosmeticId) {
|
||||||
String input = "halo_black";
|
int index = cosmeticId.indexOf('_');
|
||||||
int index = input.indexOf('_');
|
|
||||||
|
|
||||||
String mtlId = (index == -1) ? "" : input.substring(index + 1);
|
String mtlId = (index == -1) ? "" : cosmeticId.substring(index + 1);
|
||||||
|
|
||||||
|
if (mtlId.isEmpty())
|
||||||
|
mtlId = "white";
|
||||||
|
|
||||||
return of(Identifier.of("saturnclient", "models/cosmetic/" + mtlId + ".mtl"));
|
return of(Identifier.of("saturnclient", "models/cosmetic/" + mtlId + ".mtl"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user