Add hasFile checks and java misc translations
This commit is contained in:
parent
025e93b582
commit
8a2bc70c56
2 changed files with 12 additions and 2 deletions
|
|
@ -388,8 +388,19 @@ void AbstractTexturePack::load(Textures *textures)
|
|||
|
||||
bool AbstractTexturePack::hasFile(const wstring &name, bool allowFallback)
|
||||
{
|
||||
if (name == L"res/terrain.png" && terrainAtlas != nullptr)
|
||||
return true;
|
||||
|
||||
if (name == L"res/items.png" && itemAtlas != nullptr)
|
||||
return true;
|
||||
|
||||
bool hasFile = this->hasFile(name);
|
||||
|
||||
auto it = INDEXED_TO_JAVA_MAP.find(name);
|
||||
if (it != INDEXED_TO_JAVA_MAP.end()) {
|
||||
hasFile = this->hasFile(L"assets/minecraft/textures/" + it->second);
|
||||
}
|
||||
|
||||
return !hasFile && (allowFallback && fallback != NULL) ? fallback->hasFile(name, allowFallback) : hasFile;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue