Loom · Mixin · 1.20.1 / 26.x

FABRIC 模组生成器

用日常语言描述一个 Fabric 模组。Codexe 搭建完整的 Loom Gradle 项目,在需要的地方写好 mixin,并交付可运行的 .jar。

为什么用 Codexe 做 Fabric 模组

Loom Gradle,开箱即用

build.gradle wired for Fabric Loom with the right mappings, loader and API versions for the Minecraft you picked. Just ./gradlew build.

理解 Mixin

When mixin injection is needed, Codexe writes @Mixin classes, mixins.json + refmap, and registers them in fabric.mod.json. Pick the right injection point automatically.

服务端与客户端分离

Mod entry points correctly split into client and server initializers. Client-only HUDs, screens and rendering go in the right module.

Yarn 或 Mojang 映射

Pick what you prefer. Codexe outputs code matching the chosen mapping set so it compiles cleanly.

编译好的 .jar

Build runs server-side. You drop the .jar in /mods alongside fabric-api, restart, the mod loads.

源代码归你

Publish on Modrinth, CurseForge, GitHub. License however you like. No royalties.

Fabric 模组提示词示例

从通过 mixin 做的单个小改动,到完整的内容包。下面是一些可以直接粘贴的真实提示词:

新的工具等级

“A Fabric 1.21 mod that adds 'mythril' ingot, ore (overworld + deepslate variants), and full mythril tool/armor set. Mythril armor gives Speed I when full set is worn.”

Mixin:死亡时保留经验

“A Fabric mod that uses a mixin on PlayerEntity.dropXp() to skip the XP drop, so players keep all XP on death. Configurable via a JSON file in config/.”

HUD 覆盖层

“A client-side Fabric mod that draws a small HUD in the top-right showing current biome name, time of day, and number of nearby hostile mobs within 32 blocks.”

自定义配方类型

“A Fabric mod that adds a 'crusher' block with a custom recipe type. Datapacks can register inputs/outputs. Include an example datapack.”

Fabric 模组生成器常见问题

会用到 Fabric Loom 吗?

+

Yes. Codexe outputs a Loom Gradle project (build.gradle + gradle.properties wired for Fabric Loom) so you can run ./gradlew build and ./gradlew runClient out of the box.

支持 Mixin 吗?

+

Yes. If your prompt requires mixin injection (e.g. modifying vanilla behavior), Codexe writes the @Mixin classes, the mixins.json refmap and registers them in fabric.mod.json. Inject, redirect, modifyArg, it picks the right pattern.

支持哪些 Minecraft 版本?

+

1.20.1 by default, with Yarn mappings, and Minecraft 26.x when you ask for it: 26.x is not obfuscated, so the mod uses the new Loom setup (no mappings, Java 25). Write the version in the request.

用 Fabric API 还是纯 Loader?

+

Both. By default Codexe uses Fabric API (it's expected on most setups), but you can ask for a Loader-only mod and the generator will avoid the API helpers.

自定义物品、方块、实体?

+

Yes. Registry registration is done through Identifier-keyed Registry.register calls. Block entities, screen handlers, particle types, sound events, all addressable via prompt.

能编译吗?

+

Yes. Build runs server-side, you receive the .jar plus source. If a build fails the AI iterates on the error until it works.

模组归我吗?

+

Yes. Source is yours. Publish on Modrinth, CurseForge, GitHub, sell it, no royalties.

Need a different loader, or something server-side? Codexe also generates:

Codexe 如何构建和检查这些项目、需求里该写什么,以及常见问题:Fabric mods 指南。

准备好做新的模组了吗?

免费版每天补充 50K token,小型 Fabric 模组够用。

开始锻造
Fabric 模组生成器:AI 构建的 Minecraft Fabric 模组 | Codexe