Steps to reproduce:
click new profile of an older version say 1.2.2
click play
go to %appdata%/.minecraft/versions/1.2.2 notice the timestamp says 2020 on last modified instead of the timestamp on the json either from "releaseTime" or "time" It's suppose to say 2012 or something like that
This doesn't just effect the minecraft client jar. It effects all libraries, all minecraft individual version json files, all minecraft assets. The assets use to use minecraft.net or amazon aws depending on the minecraft version to get the timestamp and set it from that info.The libraries are also not set to the last modified timestamp as it doesn't exist. you download any file from the launcher it will always say the current date. There is evidence of intent by there being a "time" tag in the client.json for at least on the client.jar which doesn't get used/set. And I think when they converted to post 1.5.2 aka 1.6+ they forgot about setting the assets to the last modified date of the file and adding it to the assets index. the libraries never getting set to the last modfied was always an issue.
Minecraft launchers years ago use to download the audio files with the correct timestamp. I see you guys have tried to do this at least for the client.jar but, it's not getting applied even though it's in your json api.
Edit:
And to be perfectly clear the timestamp no longer exists for audio and I believe in the alpha days and perhaps even pre 1.6 launcher days existed. I think it would be a good idea to preserve the assets timestamps so you can know when the file was released. URLConnection#lastModified or add them to your jsons as a long timestamp and set it that way. So I consider it a bug because it use to be intended to preserve the last modified of the original audio files. As for the client jar and possibly other assets it looks like you guys started with the timestamps but, never set them to the file after it's done downloading. And if your doing it for assets/jars why not also apply the same download method to grab them from your libraries as well. I already confirmed with my own download java code that you can do this with the libs as well with their original timestamps on your amazon aws servers
If you guys no longer wish to preserve the integrity of the download date then close this issue. If not then please fix this when you have time.
Attachments
Comments 6
@Avoma the issue is the launcher doesn't use the json api to set the File#lastModified(long ms) timestamp because it no longer exists 1.6+ for assetsIndex, and for client.jar it doesn't get set using their "time" tag. They use to set the last modified for the assets pre 1.6 and I guess no one noticed it because they didn't look in the assets/objects/twochar/hash to verify the download integrity.
The log is irrelevant as the code doesn't exist anymore so nothing will print. Evidence that it is intended to set the timestamp after download could be found in the client.json file with the "time" tag. And pre 1.6 launcher use to use domains from minecraft.net s3.amazonaws.com to use the lastmodified tag on their index to set it. If it didn't do it there it definitively did it back in alpha days you can still see proxies of minecraft sounds with the timestamp and file size being linked with the file and once downloaded would say the last modified specified by the domain.
Edit: I found out you can do URLConnection.getlastModified() if it doesn't return 0 they could set the timestamp. if their web provider doesn't preserve their timestamps well or consistently then you can simply provide one inside of the json file like stated above. Either way once you get the long you simply call File#setLastModified. if your in c++ it may be an integer.
Hi @unknown, that indeed sounds strange! I've been checking at our version manifests that we are publishing, and it looks to me like 1.2.2 has the release time set to "2012-02-29T22:00:01+00:00".
Would you mind checking that for me? https://launchermeta.mojang.com/mc/game/version_manifest_v2.json
I am not sure how your local files have decided to derail from this timestamp, and instead taken the release time for 1.16.4. Try deleting your installation and version, and see if a fresh download will fix it 🙂
ok so I deleted the:
manifest json
the 1.16.4 folder
relaunched the launcher
redownloaded the game
and it's still here. (perhaps it's fixed in the beta launcher but, not the releases?)
https://bugs.mojang.com/secure/attachment/366503/Capture-1.PNG
Edit: I noticed it still occurs with older jars such as 1.2.2 and 1.5.2 and the last modified says on the file the current date
And to be perfectly clear the timestamp no longer exists for audio and I believe in the alpha days and perhaps even pre 1.6 launcher days existed. I think it would be a good idea to preserve the assets timestamps so you can know when the file was released. URLConnection#lastModified or add them to your jsons as a long timestamp and set it that way, updating this comment to the main issue
Please could you attach the launcher log to this report which can be found in
%AppData%/.minecraft/launcher_log.txt
as this would help myself along with others, determine what the problem is.