Files

28 lines
761 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Grim.js — findSkinPathIndex() (satır 523)
[← Grim.js](index.md) · [← Master](../../wiki.md)
```javascript
function findSkinPathIndex(list, rawArray) {
var fallback = 0;
var count = Number(list.size());
for (var i = 0; i < count; i++) {
var raw = rawArray && rawArray.length > i ? rawArray[i] : null;
var type = getNbtType(raw);
var value = "";
if (type === 8) {
try { value = String(list.getString(i)); } catch (e1) {}
} else {
try { value = String(list.getCompound(i).getString("Path")); } catch (e2) {}
}
if (i === 0 || value.length > 0) fallback = i;
if (isUrl(value)) return i;
}
return fallback;
}
```