improvements
This commit is contained in:
@@ -1304,7 +1304,7 @@
|
||||
return width > 0 && height > 0 && width <= 8192 && height <= 8192 ? { width, height } : null;
|
||||
}
|
||||
|
||||
function actorTextureCandidates(json, geo, modelPath) {
|
||||
function actorTextureCandidates(json, geo, modelPath, entityId = '', slimPlayer = false) {
|
||||
const candidateIds = [];
|
||||
const addId = (id) => { if (importResourceId(id) && !candidateIds.includes(id)) candidateIds.push(id); };
|
||||
if (typeof json.afw_texture === 'string') addId(json.afw_texture);
|
||||
@@ -1321,6 +1321,9 @@
|
||||
addId(`minecraft:textures/entity/${entity}.png`);
|
||||
}
|
||||
}
|
||||
if (entityId === 'minecraft:player' || filename === 'player' || filename === 'player_slim') {
|
||||
addId(`minecraft:textures/entity/player/${slimPlayer || filename === 'player_slim' ? 'slim' : 'wide'}/alex.png`);
|
||||
}
|
||||
return candidateIds;
|
||||
}
|
||||
|
||||
@@ -5032,7 +5035,7 @@
|
||||
}
|
||||
|
||||
function loadImportTextures(row, packs, io) {
|
||||
const candidates = actorTextureCandidates(row.json, row.geo, row.resolved.file);
|
||||
const candidates = actorTextureCandidates(row.json, row.geo, row.resolved.file, row.entity, row.slim);
|
||||
const ids = new Set([...candidates, ...Object.values(row.json.afw_bone_textures || {})
|
||||
.filter((value) => typeof value === 'string')]);
|
||||
row.textures = new Map();
|
||||
|
||||
Reference in New Issue
Block a user