Draw no cloak for "None" instead of the missing texture

"None" is the empty cloak id, but getCurrentCloakTexture still built textures/cloaks/.png from it, so
the renderer drew Minecraft's missing texture. It now returns null for an empty id and for any id
this version has no texture for, and the renderer already skips a null texture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-29 18:34:24 +02:00
co-authored by claude
parent 6d5df3057e
commit ba71a5b838
@@ -38,7 +38,14 @@ public class Cloaks {
availableCloaks.add(0, ""); availableCloaks.add(0, "");
} }
/**
* The cloak's texture, or null for no cloak ("", the "None" choice) and for a cloak this version
* has no texture for, which would otherwise draw as the missing texture.
*/
public static IdentifierRef getCurrentCloakTexture(String cloakName) { public static IdentifierRef getCurrentCloakTexture(String cloakName) {
if (cloakName == null || !Arrays.asList(ALL_CLOAKS).contains(cloakName)) {
return null;
}
if (Arrays.asList(ANIMATED_CLOAKS).contains(cloakName)) { if (Arrays.asList(ANIMATED_CLOAKS).contains(cloakName)) {
return IdentifierRef.ofSaturn("textures/cloaks/" + cloakName + ".gif"); return IdentifierRef.ofSaturn("textures/cloaks/" + cloakName + ".gif");
} else { } else {