mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-29 17:55:59 +00:00
cleanup: flatten dead branches in client render texture and runtime code
This commit is contained in:
@@ -11,75 +11,22 @@ FileTexturePack::FileTexturePack(std::uint32_t id, File* file,
|
||||
}
|
||||
|
||||
void FileTexturePack::unload(Textures* textures) {
|
||||
#if 0
|
||||
super.unload(textures);
|
||||
|
||||
try {
|
||||
if (zipFile != null) zipFile.close();
|
||||
}
|
||||
catch (IOException ignored)
|
||||
{
|
||||
}
|
||||
zipFile = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
InputStream* FileTexturePack::getResourceImplementation(
|
||||
const std::wstring& name) // throws IOException
|
||||
{
|
||||
#if 0
|
||||
loadZipFile();
|
||||
|
||||
ZipEntry entry = zipFile.getEntry(name.substring(1));
|
||||
if (entry == null) {
|
||||
throw new FileNotFoundException(name);
|
||||
}
|
||||
|
||||
return zipFile.getInputStream(entry);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool FileTexturePack::hasFile(const std::wstring& name) {
|
||||
#if 0
|
||||
try {
|
||||
loadZipFile();
|
||||
|
||||
return zipFile.getEntry(name.substring(1)) != null;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void FileTexturePack::loadZipFile() // throws IOException
|
||||
{
|
||||
#if 0
|
||||
if (zipFile != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
zipFile = new ZipFile(file);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool FileTexturePack::isTerrainUpdateCompatible() {
|
||||
#if 0
|
||||
try {
|
||||
loadZipFile();
|
||||
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
ZipEntry entry = entries.nextElement();
|
||||
if (entry.getName().startsWith("textures/")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
boolean hasOldFiles = hasFile("terrain.png") || hasFile("gui/items.png");
|
||||
return !hasOldFiles;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user