minecraft-multiloader
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "minecraft-multiloader":https://skillpi.com/zh/skills/deepskill-f1437a963c970d29e411b6b509bebd39036e85399449b9d07fdf85d09de81d93。安装前核对上游来源和版本:https://github.com/Jahrome907/minecraft-agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于构建和维护基于 Architectury 的 Minecraft 26.x 或 1.21.x 模组,使单一代码库可在 NeoForge 和 Fabric 之间共享。仅在需要同时支持两种加载器时使用;若只需支持单一加载器,请使用 minecraft-modding。
介绍来源: third_party · Jahrome907 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: minecraft-multiloader
description: "Build and maintain Architectury-based Minecraft 26.x or 1.21.x mods that share one codebase across NeoForge and Fabric. Use only when both loaders are required; use minecraft-modding for a single-loader project."Minecraft Multiloader Skill (Architectury)
What Is Architectury?
Architectury is a framework that
lets you write one mod codebase that compiles to both NeoForge and Fabric JARs.
The common subproject has a shared API; platform subprojects implement
platform-specific behavior behind the @ExpectPlatform abstraction.
Routing Boundaries
Use when: one shared codebase must build and ship both NeoForge and Fabric artifacts.Do not use when: the project is single-loader only (minecraft-moddingfor NeoForge/Fabric, not both).Do not use when: the task is Paper/Bukkit plugin development (minecraft-plugin-dev).
| Component | Purpose |
|---|---|
architectury-loom |
Gradle plugin — extends Fabric Loom for multiloader support |
architectury-api |
Runtime library — abstractions over both platforms |
@ExpectPlatform |
Annotation marking methods with platform-specific implementations |
common/ |
Shared code (no loader-specific APIs) |
fabric/ |
Fabric-specific code + entrypoint |
neoforge/ |
NeoForge-specific code + entrypoint |
Versions (Minecraft 1.21.11)
# gradle.properties property names used by this skill's static helper.
# Get every tool version from the exact generated or known-working project.
mod_version=1.0.0
minecraft_version=1.21.11
enabled_platforms=fabric,neoforge
architectury_version=<project pin>
fabric_loader_version=<project pin>
fabric_api_version=<project pin ending in +1.21.11>
neoforge_version=<project pin in the 21.11.x family>
loom_version=<project pin>
Pin architectury_version, the Architectury plugin version, and loom_version
from the same generated or known-working project line. This skill deliberately
does not publish a copyable dependency matrix: its static helper cannot resolve
whether a particular set of versions is compatible.
For Minecraft 26.x / Java 25, use the official Architectury Template Generator only when its version selector offers the exact target. Generate a Multiplatform project with Fabric and NeoForge, then preserve the generated Gradle layout and pins as one set. If the generator does not offer the target, begin with an already working project on that exact line and inspect its resolved build; do not relabel a 1.21.11 template as 26.x. The published template downloads are not a substitute for an exact-current scaffold.
Do not mechanically change only minecraft_version in the retained example:
26.x is unobfuscated and its Loom/remapping setup differs from 1.21.11.
Bundled References And Helpers
- Version alignment reference:
references/architectury-reference.md - Sanity checker:
./scripts/check-version-sanity.sh --root <project>
Run the sanity checker after editing gradle.properties. It is a static
syntax-and-version-family preflight: it catches missing keys, snapshot pins,
missing fabric / neoforge platforms, and obvious version-family drift. It
does not resolve dependencies, prove loader compatibility, or replace the
project's Fabric and NeoForge build and smoke tests.
Root Project Layout
my-mod/
├── build.gradle ← root build (shared config)
├── settings.gradle
├── gradle.properties
├── common/
│ ├── build.gradle
│ └── src/main/java/com/example/mymod/
│ ├── MyMod.java ← shared init
│ ├── registry/
│ │ └── ModItems.java ← shared registry declarations
│ └── platform/
│ └── PlatformHelper.java ← @ExpectPlatform methods
├── fabric/
│ ├── build.gradle
│ └── src/main/
│ ├── java/com/example/mymod/fabric/
│ │ ├── MyModFabric.java ← Fabric entrypoint
│ ├── java/com/example/mymod/platform/
│ │ └── PlatformHelperImpl.java ← Fabric @ExpectPlatform implementation
│ └── resources/
│ ├── fabric.mod.json
│ └── assets/...
└── neoforge/
├── build.gradle
└── src/main/
├── java/com/example/mymod/neoforge/
│ ├── MyModNeoForge.java ← NeoForge @Mod entry
├── java/com/example/mymod/platform/
│ └── PlatformHelperImpl.java ← NeoForge @ExpectPlatform implementation
└── resources/
├── META-INF/neoforge.mods.toml
└── assets/...
Legacy Build Template
The old fixed Gradle scripts were a 1.21.11 snapshot and are intentionally not
presented as a current scaffold. For either supported version, read
references/legacy-1.21.11-template.md
or references/architectury-reference.md
before changing generated build files. They preserve version anchors and
source-set boundaries without encouraging a partial build script to be copied
into a different Minecraft line.
Shared Common Code
common/.../MyMod.java
package com.example.mymod;
import dev.architectury.registry.registries.DeferredRegister;
import dev.architectury.registry.registries.RegistrySupplier;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.item.Item;
public class MyMod {
public static final String MOD_ID = "mymod";
// Architectury's DeferredRegister — works on both platforms
public static final DeferredRegister<Item> ITEMS =
DeferredRegister.create(MOD_ID, Registries.ITEM);
public static final RegistrySupplier<Item> MY_ITEM =
ITEMS.register("my_item", () -> new Item(new Item.Properties().setId(
ResourceKey.create(Registries.ITEM,
Identifier.fromNamespaceAndPath(MOD_ID, "my_item"))
)));
public static void init() {
ITEMS.register(); // registers with both platforms
}
}
@ExpectPlatform — platform-specific methods
Define the contract in common/:
package com.example.mymod.platform;
import dev.architectury.injectables.annotations.ExpectPlatform;
import net.minecraft.world.level.material.Fluid;
public class PlatformHelper {
@ExpectPlatform
public static boolean isModLoaded(String modId) {
// This body is replaced at compile time by the platform implementation
throw new AssertionError("ExpectPlatform implementation not found");
}
@ExpectPlatform
public static boolean isClient() {
throw new AssertionError();
}
}
Keep each platform implementation in the same Java package as the common
@ExpectPlatform class. Only the source set changes between common/,
fabric/, and neoforge/.
Implement in fabric/.../platform/PlatformHelperImpl.java:
package com.example.mymod.platform;
import net.fabricmc.loader.api.FabricLoader;
// Class name must match: <common class name>Impl
public class PlatformHelperImpl {
public static boolean isModLoaded(String modId) {
return FabricLoader.getInstance().isModLoaded(modId);
}
public static boolean isClient() {
return FabricLoader.getInstance().getEnvironmentType() ==
net.fabricmc.api.EnvType.CLIENT;
}
}
Implement in neoforge/.../platform/PlatformHelperImpl.java:
package com.example.mymod.platform;
import net.neoforged.fml.ModList;
import net.neoforged.fml.loading.FMLEnvironment;
public class PlatformHelperImpl {
public static boolean isModLoaded(String modId) {
return ModList.get().isLoaded(modId);
}
public static boolean isClient() {
return FMLEnvironment.dist.isClient();
}
}
Fabric Entrypoint
fabric/.../MyModFabric.java
package com.example.mymod.fabric;
import com.example.mymod.MyMod;
import net.fabricmc.api.ModInitializer;
public class MyModFabric implements ModInitializer {
@Override
public void onInitialize() {
MyMod.init();
}
}
fabric/.../resources/fabric.mod.json
This retained-1.21.11 metadata example follows the minimum dependencies in the upstream Architectury 1.21.11 branch. Keep the generated project's exact ranges when they are stricter.
{
"schemaVersion": 1,
"id": "mymod",
"version": "${version}",
"name": "My Mod",
"description": "A multiloader example mod",
"license": "MIT",
"environment": "*",
"entrypoints": {
"main": ["com.example.mymod.fabric.MyModFabric"]
},
"depends": {
"fabricloader": ">=0.18.2",
"fabric-api": ">=0.139.4+1.21.11",
"architectury": ">=19.0",
"minecraft": "~1.21.11"
}
}
NeoForge Entrypoint
neoforge/.../MyModNeoForge.java
package com.example.mymod.neoforge;
import com.example.mymod.MyMod;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
@Mod(MyMod.MOD_ID)
public class MyModNeoForge {
public MyModNeoForge(IEventBus modEventBus) {
MyMod.init();
}
}
neoforge/.../resources/META-INF/neoforge.mods.toml
modLoader = "javafml"
loaderVersion = "[1,)"
license = "MIT"
[[mods]]
modId = "mymod"
version = "${file.jarVersion}"
displayName = "My Mod"
description = "A multiloader example mod"
[[dependencies.mymod]]
modId = "neoforge"
type = "required"
versionRange = "[21.11,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.mymod]]
modId = "minecraft"
type = "required"
versionRange = "[1.21.11,1.22)"
ordering = "NONE"
side = "BOTH"
Build Commands
# Build both JARs simultaneously
./gradlew build
# Inspect the project's actual outputs. Generated templates choose their own
# archive base name and version convention:
find fabric/build/libs neoforge/build/libs -maxdepth 1 -type f -name '*.jar' \
! -name '*-sources.jar' ! -name '*-dev.jar' ! -name '*-javadoc.jar'
# Run in dev environment
./gradlew :fabric:runClient
./gradlew :neoforge:runClient
./gradlew :neoforge:runServer
# Datagen (if applicable)
./gradlew :neoforge:runData
Common Pitfalls
| Pitfall | Solution |
|---|---|
Using net.neoforged.* / net.fabricmc.* in common/ |
Only use vanilla MC and Architectury APIs in common |
Direct field access on DeferredRegister (NeoForge style) in common |
Use Architectury's DeferredRegister |
| Constructing a 26.x item without a registry key | Create its ResourceKey<Item> and call Item.Properties#setId before new Item |
Forgetting @ExpectPlatform throws AssertionError at runtime |
Both fabric/ and neoforge/ must have matching same-package *Impl classes |
| Assets duplicated in fabric/ and neoforge/ | Keep assets in common/src/main/resources/assets/ |
| A common Mixin imports a loader API or targets one loader's side | Put it in that platform subproject; loader-neutral Mixins may be common when both generated platform configurations include them |
| Accessing world/registry on mod init thread | Use mod bus events for setup; never access world on init |
References
- Architectury API GitHub: https://github.com/architectury/architectury-api
- Architectury API 26.2 source branch: https://github.com/architectury/architectury-api/tree/26.2
- Architectury API 1.21.11 source branch: https://github.com/architectury/architectury-api/tree/1.21.11
- Architectury Loom: https://github.com/architectury/architectury-loom
- Architectury templates: https://github.com/architectury/architectury-templates
- Architectury Template Generator: https://generate.architectury.dev/
- Architectury docs: https://docs.architectury.dev/
版本历史
-
v2.5.4
GitHub ↗
原版更新说明
- Correct version-specific examples and source links across the skill library. - Trim obsolete snippets, preserve legacy guidance, and sync all skill copies. Validated with the repository checks and all 13 skill validators. No game runtime testing was performed.
-
v2.5.3
GitHub ↗
原版更新说明
Updates the 13-skill Minecraft bundle for GPT-6 Astra and Claude Fable 5.1 workflows while preserving existing project versions and host tool boundaries. - Refreshes current Minecraft 26.x / Java 25 guidance and keeps explicit Minecraft 1.21.x / Java 21 and Forge 1.20.1 / Java 17 lanes. - Corrects pack metadata, resource references, mod and GameTest registration, Paper commands, world-generation examples, server operations, and publishing instructions. - Addresses all PR #11 review findings and strengthens regression coverage for implicit legacy GameTest templates and class-specific registration. - Synchronizes Codex, Claude Code, and plugin skill copies; package, lockfile, and both plugin manifests are version 2.5.3. Validation: full repository checks and focused positive/negative regression cases passed locally. GitHub Skills Audit and secret scanning passed on the released commit. These are content, packaging, and static-validator checks; they do not certify Java compilation or in-game behavior. Fable 5.1 guidance was checked against official documentation, without a live authenticated model evaluation. See the [September skill audit](https://github.com/Jahrome907/minecraft-agent-skills/blob/v2.5.3/docs/skill-audit-2026-09.md) for sources, coverage, and validation limits. Changes: https://github.com/Jahrome907/minecraft-agent-skills/pull/11
-
v2.5.2
GitHub ↗
原版更新说明
Refreshes the skill set for current Minecraft 26.2 and Java 25 while preserving explicit Minecraft 1.21.x and Forge 1.20.1 legacy lanes. Adds current pack metadata, Paper and MockBukkit examples, 26.2 multiloader validation, corrected GameTest structure paths, refreshed self-contained YAML tooling and Markdown lint dependencies, and Node 24-compatible pinned GitHub Actions. Validated by the full repository check and secret scan.
-
v2.5.1
GitHub ↗
原版更新说明
## Added - Added a README quick-install prompt for installing the Codex or Claude Code skill bundle without manually cloning the repo. ## Changed - Corrected worldgen, resource-pack, command-script, and server-ops examples. - Hardened datapack, worldgen, Paper plugin, testing, multiloader, and workflow validation coverage. - Clarified Codex plugin install requirements and aligned CI with the full local check gate. - Pinned workflow actions to full commit SHAs. - Bumped package and plugin metadata to version 2.5.1.
-
v2.5.0
GitHub ↗
原版更新说明
### Changed - Refreshed 1.21.x version guidance for Fabric 1.21.11, Architectury multiloader artifacts, MockBukkit 4.x, and Gradle setup actions. - Corrected 1.21.9+ datapack/resource-pack metadata examples and validators to use exact `[major, minor]` pack versions instead of JSON decimals. - Added resource-pack validator coverage for 1.21.4+ `assets/<namespace>/items/*.json` item model definitions. - Updated command examples for 1.21.9 spawn rotation syntax and 1.21.11 namespaced gamerules, and made the bundled stopwatch `.mcfunction` copyable. - Hardened server-admin, WorldEdit, and EssentialsX ops guidance around Velocity forwarding, backup quiescing, WorldEdit history cleanup, sign-shop permissions, and spawn-module checks. - Added local mirror-sync validation to `npm run check` and aligned CI to use the same npm script entrypoints. - Clarified that this bundle remains centered on 1.21.x and that Minecraft 26.1.x requires a separate Java/API/data-format verification pass. - Bumped package and plugin metadata to version `2.5.0`.
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对 Minecraft 模组开发这一明确的高频刚需场景,提供 Architectury 多加载器支持方案
- 解决了 NeoForge 和 Fabric 双平台代码复用的核心痛点,显著提升开发效率
亮点
- 触发描述精准完整,明确区分了 multiloader 与 single-loader 的使用边界
- 提供了清晰的版本适用范围(1.21.11 和 26.x)和使用前提条件
亮点
- 文档结构清晰完整,包含 What Is、Versions、Layout、Code Examples、Build Commands、Pitfalls 等完整章节
- 提供了端到端的代码示例和项目结构说明,便于用户理解和实施
亮点
- 提供了版本对齐参考和静态检查脚本,确保版本兼容性
- 详细列出了常见陷阱及解决方案,提高执行成功率
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- docs.architectury.dev
- generate.architectury.dev
- github.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。