跳到正文

FootLib

作者:Foot

This is the shared class and API for all of my mods

收藏

截图

介绍

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

FootLib

FootLib is the API and utility library used by the Foot‑series mods.
It provides shared systems such as:

  1. Currency definitions (WIP)
  1. Exchange‑rate systems (WIP)
  1. This is also the shared API for ALL of my mods (WIP)

Versioning

FootLib uses a four‑segment versioning system:

Overhaul.Major.Semi‑major.Patch/Hotfix/Minor‑tag

Example:
0.0.1.0 → Semi‑major update (1 in the third position)

Meaning of each segment

  • Overhaul

Backward compatibility breaks.
Overhaul does not mean big update, it means there is no backward compatibility from this point.

  • Major

New systems, new mechanics, or major expansions.

  • Semi‑major

Significant content or system additions.
Big‑minor updates that don’t break previous API.

  • Patch / Hotfix / Minor

Small updates, bugfixes, micro‑features, or emergency fixes.

Pre‑release tags

-tag There are a lot of tags to choose from so let me show you the tags used for this project:

  • release: A stable build which should be able to be depended on freely.
  • beta: A release candidate/validation of -alpha code.
  • alpha: A semi-stable experimental build.

The tags shown below this are only available on GitHub due to their unstable nature:

  • nightly: An unstable experimental build.
  • dev: Development branch.

Important Note

An Overhaul (1.x.x.x, 2.x.x.x, etc.) ends support for all previous Foot mods.

This is why FootLib does not use SemVer — SemVer cannot express the difference between a major update and a update which breaks all dependencies overhaul.
FootLib’s versioning makes the reason for incompatibility explicit.
DON’T WORRY THIS MOD IS STILL GETTING UPDATES AND NEW FEATURES, I ALSO JUST HAPPEN TO HAVE MORE PROJECTS IN MIND SO GETTING THEM COMPLETED IS KEY

Usage
Maven Repo

repositories {
    maven { url = "https://api.modrinth.com/maven" }
}

Gradle (Groovy)

dependencies {
    implementation("maven.modrinth:footlib:${footlib_version}")
}

neoforge.mods.toml

[[dependencies.${mod_id}]]
    modId="footlib"
    type="required"
    versionRange="[min_version, max_version)"
    ordering="NONE"
    side="BOTH"
#Put an actual version in min_version and max_version

Protips for those looking to have a dependency with this mod:

  1. When setting you neoforge.mods.toml then usually you want to set the versionRange to [0.0.0.1, 1.0.0.0) or [1.0.0.0, 2.0.0.0) and if you need a feature from non-overhaul versions then you can do something like this: [0.2.5.4, 1.0.0.0)
  2. Unless you are absolutely sure that several overhaul versions work, only target the newest out of your candidates.

常见问题

FootLib 支持哪些 Minecraft 版本?

FootLib 支持 Minecraft Java 版 1.21–26.2,共 15 个版本,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

FootLib 怎么安装?

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

评论

登录后评论和评分

Foot 的其他作品

查看全部 →