Skip to content

适用于 Minecraft 1.20.1, 1.21.1 的 Lexiconfig 模组

这是一个配置 API,旨在提供许多集成以及其他库,并尽可能易于使用,无论对开发者还是用户都是如此。

次下载
5 次下载
次浏览
48 次浏览
已更新
已更新 24.10.2026

概述

这是一个配置 API,旨在提供与多个其他配置库的兼容性,并且在多加载器项目设置中易于使用,主要用于我的模组。

它采用简单易用的基于注解的语法,尽可能简化新配置文件的创建。

如果你是模组用户,这些信息可能对你没什么用。但如果你是模组开发者,并且希望在自己的项目中使用 Lexiconfig,请继续向下滚动到开发部分。

它目前尚不支持其他配置库,但随着我持续更新,我会为每一个添加更多兼容性,以确保它不会与其他库冲突,而是能够在它们之间无缝集成。

以下是当前以及计划中跨不同配置库/API 的集成列表:

❌ - 未集成 ✅ - 已集成 ❓ - 进行中

状态 模组

❌ Cloth Config

❌ oωo config

✅ Configured

❌ Forge Config Screens

开发

此模组包含一个 API,可用于注册新的 lexicon、监听事件等。

依赖

build.gradle

dependencies { implementation "com.codinglitch.lexiconfig:lexiconfig-api:APIVERSIONHERE" }

你可以前往 https://versions.codinglitch.com 查看最新的 API 版本。

用法

要注册你自己的 lexicon,你首先需要创建自己的 Library。这可以通过简单地创建一个继承 Library 类的新类,并为其添加 LexiconLibrary 注解来完成。

@LexiconLibrary public class MyNewLibrary extends Library { @Override public void shelveLexicons() { } }

在 Forge 环境中,无需做进一步修改。但是,如果你是为 Fabric 开发,则必须将此类别添加为 fabric.mod.json 中的入口点。

fabric.mod.json

//... "entrypoints": { "lexiconfig": [ "com.path.to.MyNewLibrary" ] } //...

下一步是最终创建并注册你的 lexicon。你可以通过简单地为 lexicon 创建另一个类,并为其提供适当的注解来完成,如下所示:

@Lexicon(name = MYLEXICONTITLE) // 最好使用你的模组 ID 作为名称 public class MyLexicon extends LexiconData { @LexiconEntry(comment = "This is a comment for a simple field!") public String mySimpleField = "content"; @LexiconPage(comment = "This is a fancy new comment on the fancy new category!") public MyNewPage myNewPage = new MyNewPage(); public static class MyNewPage extends LexiconPageData { @LexiconEntry(comment = "This field is inside a lexicon page!") public Boolean myPageField = true; } }

下一步也是最后一步是注册该 lexicon,这可以通过简单地将其实例作为库中的字段添加,并在给定的方法中注册它来完成。

@LexiconLibrary public class MyNewLibrary extends Library { public static MyLexicon MYLEXICON = new MyLexicon(); @Override public void shelveLexicons() { LexiconfigApi.shelveLexicon(MYLEXICON); } }

如何安装 Lexiconfig

With Millida Launcher

  1. Install Millida Launcher

    The launcher is free: download it at millida.net/launcher and sign in with any nickname.

  2. Click “Install” on this page

    The launcher opens and installs the mod for Minecraft 1.18–1.21.11 on Fabric, Forge or NeoForge automatically.

  3. Launch the game

    A profile with it appears in the launcher: click “Play”.

Manually

  1. Install Fabric, Forge or NeoForge

    The loader must match the game version of the mod file, for example Minecraft 1.21.11. After installing it, a separate profile appears in your launcher.

  2. Download the file for your version

    In the version list above, pick the file lexiconfig-neoforge-1.4.21-novel.jar (64 KB) for your game version and loader.

  3. Put it in the mods folder

    The folder is inside .minecraft (Windows: %appdata%\.minecraft\mods). If it does not exist, create it.

  4. Launch the loader profile

    Open “Mods” in the main menu: Lexiconfig should be in the list.

Minecraft 1.21.11 runs on Java 21: with a different Java version the game may close right after launch.

版本

含依赖项

Minecraft加载器文件日期操作
1.21NeoForge[NEOFORGE] Lexiconfig 1.4.21-novel63.8 KB 1
1.21Fabric[FABRIC] Lexiconfig 1.4.21-novel271 KB 2
1.18.1Forge[FORGE] Lexiconfig 1.4.21-epic65.6 KB 2

常见问题

Which Minecraft versions does Lexiconfig work on?

There are files for 1.18–1.21.11, 27 versions in total. The newest is 1.21.11.

Is Lexiconfig for Forge or Fabric?

There are files for Fabric: 1.21–1.21.11, for Forge: 1.18–1.20.6 and for NeoForge: 1.21–1.21.11.

Does Lexiconfig need other mods?

The author lists no required dependencies: the Fabric, Forge or NeoForge loader is enough.

Which Java does Lexiconfig need?

Minecraft 1.21.11 runs on Java 21. If the game closes right after launch, the usual cause is the wrong Java version in the profile settings.

Where can I download Lexiconfig safely?

On this page: the file lexiconfig-neoforge-1.4.21-novel.jar (64 KB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: f862c78f4d27938208913d1c3ee4d9be1a13d166.

评价

成为第一个评价 Lexiconfig 的人

评论 0

登录后即可评论登录

相似模组

全部模组

了解更多