try to avoid not supporting translucent
This commit is contained in:
@@ -135,6 +135,8 @@ public class MinecraftAssetService extends IMinecraftAssetService {
|
||||
public File getAssetObject(String assetId, String name) throws IOException {
|
||||
try {
|
||||
AssetsIndex index = (AssetsIndex) C.GSON.fromJson(FileUtils.read(getIndexFile(assetId), "UTF-8"), AssetsIndex.class);
|
||||
if (index == null || index.getFileMap() == null || index.getFileMap().get(name) == null)
|
||||
throw new IOException("Assets file format malformed.");
|
||||
return getAssetObject(assetId, (AssetsObject) index.getFileMap().get(name));
|
||||
} catch (JsonSyntaxException e) {
|
||||
throw new IOException("Assets file format malformed.", e);
|
||||
|
||||
@@ -59,7 +59,12 @@ public final class OfflineAuthenticator extends AbstractAuthenticator {
|
||||
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
|
||||
if (StrUtils.isBlank(info.username))
|
||||
throw new AuthenticationException(C.i18n("login.no_Player007"));
|
||||
String uuid = getUUIDFromUserName(info.username);
|
||||
String uuid;
|
||||
try {
|
||||
uuid = getUUIDFromUserName(info.username);
|
||||
} catch(IllegalArgumentException e) {
|
||||
throw new AuthenticationException("Could not find md5 digest algorithm, please reinstall Java or even your OS.", e);
|
||||
}
|
||||
if (uuidMap != null && uuidMap.containsKey(info.username) && uuidMap.get(info.username) instanceof String)
|
||||
uuid = (String) uuidMap.get(info.username);
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user