跳到正文

Clepsydra

The public API for Seasons Veil — lets any mod read the current season (and how far through it you are) as an optional soft dependency. Written in Java with zero Minecraft-version lock-in.

收藏

介绍

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

ONLY DEVELOPERS USE.

## What is this?

Clepsydra is the public API of Seasons Veil. It’s a tiny library mod that lets other
mods read the current season plus how far through
the season you are without depending on the whole Seasons Veil mod.

It’s pure Java with no Minecraft-version coupling, so a mod can compile against it once
and stay compatible across game versions.

## Do players need this?

Only if another mod asks for it. Seasons Veil already bundles Clepsydra inside itself,
so if you have Seasons Veil you do NOT need to install this separately. Install this
standalone only if a mod lists Clepsydra as a required dependency on its own.

It works safely whether or not Seasons Veil is present, everything just returns “no
season data” when Seasons Veil isn’t installed, so it never causes crashes or load-order
problems.

## For mod developers

Depend on Clepsydra (not the whole Seasons Veil mod) and read season state as a soft
dependency:

    if (Clepsydra.isAvailable()) {
        Season season = Clepsydra.seasonAt(level);
        SeasonState state = Clepsydra.stateAt(level); // season(), progress(), warmth()…
    }

Everything degrades to null / false when Seasons Veil isn’t installed, so it’s safe
regardless of load order or whether the mod is present at all.

Pull it from Modrinth’s Maven:

AS OF RIGHT NOW, IT IS NOT RELEASED ON MODRINTH YET, I AM WAITING FOR IT TO BE REVIEWED

    repositories { maven(“https://api.modrinth.com/maven“) }
    dependencies {
        modImplementation(“maven.modrinth:clepsydra:1.0.0”)
        include(“maven.modrinth:clepsydra:1.0.0”) // optional: bundle it (Fabric jar-in-jar)
    }

常见问题

Clepsydra 支持哪些 Minecraft 版本?

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

Clepsydra 怎么安装?

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

评论

登录后评论和评分

DaGreazeMaster 的其他作品

查看全部 →