File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
FCLCore/src/main/java/com/tungsten/fclcore Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,42 @@ public DownloadInfo getDownloadInfo() {
224224
225225 public AssetIndexInfo getAssetIndex () {
226226 String assetsId = assets == null ? "legacy" : assets ;
227- return assetIndex == null ? new AssetIndexInfo (assetsId , Constants .DEFAULT_INDEX_URL + assetsId + ".json" ) : assetIndex ;
227+
228+ if (assetIndex == null ) {
229+ String hash ;
230+ switch (assetsId ) {
231+ case "1.8" :
232+ hash = "f6ad102bcaa53b1a58358f16e376d548d44933ec" ;
233+ break ;
234+ case "14w31a" :
235+ hash = "10a2a0e75b03cfb5a7196abbdf43b54f7fa61deb" ;
236+ break ;
237+ case "14w25a" :
238+ hash = "32ff354a3be1c4dd83027111e6d79ee4d701d2c0" ;
239+ break ;
240+ case "1.7.4" :
241+ hash = "545510a60f526b9aa8a38f9c0bc7a74235d21675" ;
242+ break ;
243+ case "1.7.10" :
244+ hash = "1863782e33ce7b584fc45b037325a1964e095d3e" ;
245+ break ;
246+ case "1.7.3" :
247+ hash = "f6cf726f4747128d13887010c2cbc44ba83504d9" ;
248+ break ;
249+ case "pre-1.6" :
250+ hash = "3d8e55480977e32acd9844e545177e69a52f594b" ;
251+ break ;
252+ case "legacy" :
253+ default :
254+ assetsId = "legacy" ;
255+ hash = "770572e819335b6c0a053f8378ad88eda189fc14" ;
256+ }
257+
258+ String url = Constants .DEFAULT_INDEX_URL + hash + "/" + assetsId + ".json" ;
259+ return new AssetIndexInfo (assetsId , url );
260+ } else {
261+ return assetIndex ;
262+ }
228263 }
229264
230265 public boolean appliesToCurrentEnvironment () {
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ public class Constants {
2121
2222 public static final String DEFAULT_LIBRARY_URL = "https://libraries.minecraft.net/" ;
2323 public static final String DEFAULT_VERSION_DOWNLOAD_URL = "https://bmclapi2.bangbang93.com/versions/" ;
24- public static final String DEFAULT_INDEX_URL = "https://launchermeta.mojang.com/mc-staging/assets/legacy/c0fd82e8ce9fbc93119e40d96d5a4e62cfa3f729 /" ;
24+ public static final String DEFAULT_INDEX_URL = "https://launchermeta.mojang.com/v1/packages /" ;
2525
2626}
You can’t perform that action at this time.
0 commit comments