mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-11 04:46:18 -04:00
fix null field of asset index of 1.7.2
This commit is contained in:
parent
2434e069f5
commit
c321cb5f91
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,7 +14,6 @@ hs_err_pid*
|
|||||||
.gradle
|
.gradle
|
||||||
.nb-gradle
|
.nb-gradle
|
||||||
|
|
||||||
*.map
|
|
||||||
*.bat
|
*.bat
|
||||||
*.log
|
*.log
|
||||||
.mine*
|
.mine*
|
||||||
|
4294
HMCL/obfuscate_2.3.3.map
Normal file
4294
HMCL/obfuscate_2.3.3.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -129,10 +129,11 @@ public class MinecraftLoader extends AbstractMinecraftLoader {
|
|||||||
try {
|
try {
|
||||||
AssetsIndex index = (AssetsIndex) C.gson.fromJson(FileUtils.readFileToString(indexFile, "UTF-8"), AssetsIndex.class);
|
AssetsIndex index = (AssetsIndex) C.gson.fromJson(FileUtils.readFileToString(indexFile, "UTF-8"), AssetsIndex.class);
|
||||||
|
|
||||||
|
if (index == null) return assetsDir;
|
||||||
if (index.isVirtual()) {
|
if (index.isVirtual()) {
|
||||||
|
int cnt = 0;
|
||||||
HMCLog.log("Reconstructing virtual assets folder at " + virtualRoot);
|
HMCLog.log("Reconstructing virtual assets folder at " + virtualRoot);
|
||||||
int tot = index.getFileMap().entrySet().size();
|
int tot = index.getFileMap().entrySet().size();
|
||||||
int cnt = 0;
|
|
||||||
for (Map.Entry entry : index.getFileMap().entrySet()) {
|
for (Map.Entry entry : index.getFileMap().entrySet()) {
|
||||||
File target = new File(virtualRoot, (String) entry.getKey());
|
File target = new File(virtualRoot, (String) entry.getKey());
|
||||||
File original = new File(new File(objectDir, ((AssetsObject) entry.getValue()).getHash().substring(0, 2)), ((AssetsObject) entry.getValue()).getHash());
|
File original = new File(new File(objectDir, ((AssetsObject) entry.getValue()).getHash().substring(0, 2)), ((AssetsObject) entry.getValue()).getHash());
|
||||||
|
7854
HMCSM/obfuscate_0.8.6.map
Normal file
7854
HMCSM/obfuscate_0.8.6.map
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user