mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-24 07:56:30 +00:00
Add hasFile checks and java misc translations
This commit is contained in:
parent
025e93b582
commit
8a2bc70c56
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
#include "TexturePack.h"
|
||||
|
||||
class BufferedImage;
|
||||
|
|
@ -34,8 +33,8 @@ protected:
|
|||
|
||||
ColourTable *m_colourTable;
|
||||
|
||||
protected:
|
||||
BufferedImage *iconImage;
|
||||
std::unique_ptr<BufferedImage> terrainAtlas, itemAtlas, bedTexCache;
|
||||
|
||||
private:
|
||||
int textureId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue