跳到正文

Auto Updater

作者:the-sgg-yt

A mod which automatically updates all of your mods to the latest version using the Modrinth API!

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

The Auto Updater logo

WARNING: This mod currently supports Windows PCs only, due to it using the %APPDATA% file path. This mod will almost certainly crash or behave unpredictably on Linux / macOS machines.

Introduction

Hello! This is a mod I made to solve the issue of having to install 30+ mods manually every time something updated. Well, now you don’t have to worry about that! Enter Auto Updater: a simple yet extremely useful mod to update all of your mods for you at the click of a button! (See “How do I install these updated mods?” for information on where they get downloaded to.)

Dependencies

  • Fabric API for Minecraft version 26.2

What it does

When you press Q (or another custom key), a window opens up which asks you if you would like to update your mods.

Choosing “yes” will automatically download the newest versions of all of your mods.

If an updated version is not found (for instance, if your mod was downloaded on Curseforge or does not have a version for the latest update available yet), Auto Updater will simply move the mod without changes to the updated folder.

How do I install these updated mods?

If you would like any mod in your mods folder to be ignored, append _IGNORE to the end of the file name (e.g. sodium_IGNORE.jar).

After all mods are downloaded, navigate to the %APPDATA%\.minecraft\mods folder. (can also be styled as C:\Users\\[your user]\AppData\Roaming\.minecraft\mods)

Then, move all your previous mods to a backup folder and move all files in the subfolder updated into the main mods folder. Once you are happy it all works, you can delete the old mods if you want.

It is completely safe to delete the updated folder.

(All of the above is outlined in the mod GUI, but I thought it would be good to paste it here anyways.)

Images

A prompt on-screen asking if the user wants to update their mods

Go to the gallery for more images!

Coming soon

Some features that will come soon include:

  • A Cancel button
  • Better integration with Minecraft and especially the renderer
  • The ability to press Q while not in a world

…and much more!

Links

My GitHub repository for this mod

Found an issue? Report it!

How this mod works

This section applies for versions v1.3.0 onwards.

This mod primarily uses the free Modrinth API in order to get the files for the mods.
It uses the Java “HttpClient“ library to achieve this.

(These steps are repeated for each file in your mods directory)

Step 1: The mod gets the SHA-512 hash of the file and uses it with the “Get Latest Version from File Hash” API on Modrinth (“https://api.modrinth.com/v2/version_file/{hash}/update“)

Step 2: The mod finds the first file in the “files` section of the JSON (multiple files are not supported yet, though they don't seem to be common) and gets the `url“ data.

Step 3: Then, the mod downloads the JAR from the URL and places it inside the updated folder in your mods directory.

Step 4: If the file hash does not match with the expected hash, the file is downloaded again. When the hashes do match, the program moves on to the next file and repeats these steps.

常见问题

Auto Updater 支持哪些 Minecraft 版本?

Auto Updater 支持 Minecraft Java 版 26.2,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Auto Updater 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分

the-sgg-yt 的其他作品

查看全部 →