minecraft-modding
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "minecraft-modding":https://skillpi.com/zh/skills/deepskill-1e7253f358ccf4d35a2b92191216663025dd321dd38fabc676cd0983b7d0141c。安装前核对上游来源和版本:https://github.com/Jahrome907/minecraft-agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于创建、修改、调试或迁移适用于当前 NeoForge 或 Fabric 26.x、旧版 1.21.x 以及 Forge 1.20.1 的 Minecraft 模组。适用于实现基于加载器的游戏逻辑代码和资源;若单个代码库需同时支持现代加载器,请改用 minecraft-multiloader。
介绍来源: third_party · Jahrome907 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: minecraft-modding
description: "Create, modify, debug, or migrate Minecraft mods for current NeoForge or Fabric 26.x, legacy 1.21.x, and Forge 1.20.1. Use for loader-based gameplay code and assets; use minecraft-multiloader when one codebase must target both modern loaders."Minecraft Modding Skill
Overview
Supported platforms:
| Platform | MC Version | Java | Build System |
|---|---|---|---|
| NeoForge | 26.x current; 1.21.11 examples retained | Java 25 current; Java 21 on 1.21.x | Gradle + ModDevGradle |
| Forge | 1.20.1 legacy lane | Java 17 | Gradle + ForgeGradle 6 |
| Fabric | 26.x current; 1.21.11 examples retained | Java 25 current; Java 21 on 1.21.x | Gradle + Fabric Loom |
| Architectury (multiloader) | 26.x or 1.21.x | Match Minecraft | Gradle + Architectury Loom |
Always confirm the platform and Minecraft version from gradle.properties or build.gradle
before writing any mod-specific code.
Minecraft 26.1 introduced Java 25 and unobfuscated game executables. For 26.x projects, start from the current loader generator or example mod and preserve its build layout. Do not copy the 1.21.11 mapping, Loom plugin, remapping task, or Java 21 snippets in this skill into a 26.x project. Fabric 26.x uses the non-remapping Loom path and official names; NeoForge 26.x should start from the current NeoForge generator. The detailed API references cover legacy 1.21.x examples unless a section explicitly says 26.x.
Routing Boundaries
Use when: the task is Java/Kotlin mod code, registry/event work, networking, datagen wiring, and loader APIs.Do not use when: the task is command-only vanilla logic (minecraft-commands-scripting) or pure datapacks (minecraft-datapack).Do not use when: the task targets Paper/Bukkit plugins (minecraft-plugin-dev).
1. Identifying the Platform
# NeoForge project signature
grep -r "net.neoforged" gradle.properties build.gradle settings.gradle 2>/dev/null | head -5
# Forge 1.20.1 project signature
grep -r "net.minecraftforge" gradle.properties build.gradle settings.gradle 2>/dev/null | head -5
# Fabric project signature
grep -r "fabric" gradle.properties build.gradle settings.gradle 2>/dev/null | head -5
# Read mod ID and version
cat gradle.properties
Key files per platform:
- NeoForge:
src/main/resources/META-INF/neoforge.mods.toml, annotated@Modmain class - Forge 1.20.1:
src/main/resources/META-INF/mods.toml,net.minecraftforge:forgedependency - Fabric:
src/main/resources/fabric.mod.json, class implementingModInitializer - Architectury:
common/,fabric/,neoforge/subprojects
2. Build & Test Commands
# Build the mod jar
./gradlew build
# Run the Minecraft client to test
./gradlew runClient
# Run a dedicated server to test
./gradlew runServer
# Run game tests (NeoForge JUnit-style game tests)
./gradlew runGameTestServer
# Run data generation (generates JSON assets automatically)
./gradlew runData
# Remove this project's generated build outputs before a fresh rebuild
./gradlew clean
# Check for dependency updates (optional)
./gradlew dependencyUpdates
./gradlew build runs the project's configured build tasks. Candidate mod jars are
usually under build/libs/, but task names and file names are project-specific.
Check the build result, then identify the intended
distributable before publishing it.
3. Project Layout (NeoForge)
src/
main/
java/<groupId>/<modid>/
MyMod.java ← @Mod entry point
block/
ModBlocks.java ← DeferredRegister.Blocks
MyCustomBlock.java
item/
ModItems.java ← DeferredRegister.Items
entity/
ModEntities.java ← DeferredRegister.Entities
menu/ ← custom GUI containers
recipe/
worldgen/
datagen/
ModDataGen.java ← GatherDataEvent handler
providers/
resources/
META-INF/
neoforge.mods.toml ← mod metadata (renamed from mods.toml in NeoForge 1.20.5+)
assets/<modid>/
blockstates/ ← JSON blockstate definitions
models/
block/ ← block model JSON
item/ ← item model JSON
items/ ← 1.21.4+ item-definition JSON
textures/
block/ ← 16×16 PNG textures
item/
lang/
en_us.json ← translation strings
data/<modid>/
recipe/ ← crafting recipe JSON (26.x)
loot_table/
blocks/ ← per-block loot table JSON
tags/
block/
item/
4. Project Layout (Forge 1.20.1)
Use this layout only when minecraft_version=1.20.1 and the project depends on
net.minecraftforge:forge. Forge 1.20.1 is not NeoForge: keep mods.toml,
net.minecraftforge.* imports, Java 17, and ForgeGradle 6 patterns.
src/
main/
java/<groupId>/<modid>/
MyMod.java <- @Mod entry point
block/
ModBlocks.java <- DeferredRegister.Blocks
item/
ModItems.java <- DeferredRegister.Items
datagen/
ModDataGen.java <- GatherDataEvent handler
resources/
META-INF/
mods.toml <- Forge metadata
assets/<modid>/ <- client assets
data/<modid>/ <- server data using 1.20.1 paths
See references/forge-1.20.1-api.md before editing Forge 1.20.1 projects.
5. Project Layout (Fabric)
src/
main/
java/<groupId>/<modid>/
MyMod.java ← implements ModInitializer
client/
MyModClient.java ← implements ClientModInitializer
block/
item/
mixin/ ← Mixin classes
resources/
fabric.mod.json
assets/<modid>/ ← same as NeoForge
data/<modid>/ ← same as NeoForge
<modid>.mixins.json ← mixin configuration
6. Core Concepts Cheatsheet
Sides
- Physical client – the game client JAR (has rendering code)
- Physical server – the dedicated server JAR (no rendering)
- Logical client – the client thread (handles rendering, input)
- Logical server – the server thread (handles world simulation)
- Code decorated with
@OnlyIn(Dist.CLIENT)(NeoForge) or@Environment(EnvType.CLIENT)(Fabric) must NEVER run on the server.
Registries
Everything in Minecraft lives in a registry. Always register objects; never construct them at field initializer time outside a registry call. Use the mapping-appropriate registry constants for the loader you are editing:
| Type | NeoForge / Mojang mappings | Fabric / Yarn mappings |
|---|---|---|
| Blocks | BuiltInRegistries.BLOCK |
Registries.BLOCK |
| Items | BuiltInRegistries.ITEM |
Registries.ITEM |
| Entity types | BuiltInRegistries.ENTITY_TYPE |
Registries.ENTITY_TYPE |
| Block entity types | BuiltInRegistries.BLOCK_ENTITY_TYPE |
Registries.BLOCK_ENTITY_TYPE |
| Menu / screen-handler types | BuiltInRegistries.MENU |
Registries.SCREEN_HANDLER |
| Sound events | BuiltInRegistries.SOUND_EVENT |
Registries.SOUND_EVENT |
| Biomes | Registries.BIOME registry keys |
RegistryKeys.BIOME registry keys |
Do not copy older Registry.BLOCK / Registry.ITEM constants into 1.21.x code;
those names are stale for the examples in this skill.
ResourceLocation / Identifier
Every registry entry needs a namespaced ID:
// 26.x official names (NeoForge and Fabric)
Identifier id = Identifier.fromNamespaceAndPath("mymod", "my_block");
// Older Mojang mappings use ResourceLocation; keep the project's version.
// Legacy Fabric with Yarn mappings
Identifier id = Identifier.of("mymod", "my_block");
7. NeoForge Quick Patterns (26.x)
For 26.x, use the explicitly labelled 26.x sections in
references/common-patterns.md and select the project's exact version in the
NeoForge documentation.
references/neoforge-api.md contains legacy 1.21.x / Java 21 patterns only;
do not copy its dependency pins into a 26.x project.
// Main mod class
@Mod(MyMod.MOD_ID)
public class MyMod {
public static final String MOD_ID = "mymod";
public MyMod(IEventBus modEventBus) {
ModBlocks.BLOCKS.register(modEventBus);
ModItems.ITEMS.register(modEventBus);
modEventBus.addListener(this::commonSetup);
}
private void commonSetup(FMLCommonSetupEvent event) {
// runs after all mods are registered
}
}
// Block registration
public class ModBlocks {
public static final DeferredRegister.Blocks BLOCKS =
DeferredRegister.createBlocks(MyMod.MOD_ID);
public static final DeferredBlock<Block> MY_BLOCK =
BLOCKS.registerSimpleBlock("my_block",
BlockBehaviour.Properties.of()
.mapColor(MapColor.STONE)
.strength(1.5f, 6.0f)
.sound(SoundType.STONE)
.requiresCorrectToolForDrops());
}
8. Forge 1.20.1 Quick Patterns
See full patterns in references/forge-1.20.1-api.md.
// Main mod class
@Mod(MyMod.MOD_ID)
public class MyMod {
public static final String MOD_ID = "mymod";
public MyMod(FMLJavaModLoadingContext context) {
IEventBus modEventBus = context.getModEventBus();
ModBlocks.BLOCKS.register(modEventBus);
ModItems.ITEMS.register(modEventBus);
modEventBus.addListener(this::commonSetup);
MinecraftForge.EVENT_BUS.register(this);
}
private void commonSetup(FMLCommonSetupEvent event) {
// runs after registries are prepared
}
}
// Block registration
public class ModBlocks {
public static final DeferredRegister<Block> BLOCKS =
DeferredRegister.create(ForgeRegistries.BLOCKS, MyMod.MOD_ID);
public static final RegistryObject<Block> MY_BLOCK =
BLOCKS.register("my_block", () -> new Block(
BlockBehaviour.Properties.of()
.mapColor(MapColor.STONE)
.strength(1.5f, 6.0f)
.sound(SoundType.STONE)
.requiresCorrectToolForDrops()));
}
9. Fabric Quick Patterns
Match the project's Minecraft version and mappings in the
Fabric documentation.
references/fabric-api.md contains legacy 1.21.x / Java 21 patterns only.
The explicitly labelled 26.x sections in references/common-patterns.md
use NeoForge syntax; adapt them against the exact Fabric API rather than
copying loader-specific classes or legacy dependency pins.
// Main mod class
public class MyMod implements ModInitializer {
public static final String MOD_ID = "mymod";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
ModBlocks.initialize();
ModItems.register();
}
}
// Fabric 26.x with official Mojang mappings. Create the key before the object
// so its properties receive the required id during construction.
public final class ModBlocks {
public static final ResourceKey<Block> MY_BLOCK_KEY = ResourceKey.create(
Registries.BLOCK,
Identifier.fromNamespaceAndPath(MyMod.MOD_ID, "my_block")
);
public static final Block MY_BLOCK = register(
MY_BLOCK_KEY,
Block::new,
BlockBehaviour.Properties.of()
.mapColor(MapColor.STONE)
.strength(1.5f, 6.0f)
.sound(SoundType.STONE)
.requiresCorrectToolForDrops()
);
private static Block register(ResourceKey<Block> key,
Function<BlockBehaviour.Properties, Block> factory,
BlockBehaviour.Properties properties) {
Block block = factory.apply(properties.setId(key));
return Registry.register(BuiltInRegistries.BLOCK, key, block);
}
public static void initialize() {}
}
Call ModBlocks.initialize() from the Fabric initializer. The Yarn-named
1.21.11 examples remain in references/fabric-api.md; do not mix those names
with this 26.x pattern.
10. JSON Asset Templates
Always provide matching JSON assets for every registered block/item.
Codex should generate or update these files alongside Java code.
For Forge 1.20.1, check references/forge-1.20.1-api.md for legacy server-data
directory names before creating loot tables or tags.
See references/common-patterns.md for full JSON templates for:
- Blockstate JSON
- Block model JSON (cube, slab, stairs, fence, door, trapdoor, etc.)
- Item model JSON
- Loot table JSON
- Recipe JSON (crafting_shaped, crafting_shapeless, smelting, blasting, stonecutting)
- Language file (
en_us.json) entries - Tag JSON
11. Data Generation
Use the project's configured data providers. Current NeoForge uses
GatherDataEvent.Client / .Server and event.createProvider(...); the MDK
normally generates both asset and data providers with runClientData. See the
version-matched resource guide
before wiring providers. Keep Fabric and older projects on their own datagen
entrypoints and Gradle tasks, then inspect the generated files.
For Forge 1.20.1, use the mod-event-bus registration, GatherDataEvent
signature, provider classes, and legacy output paths from
references/forge-1.20.1-api.md.
12. Common Tasks Checklist
When adding a new block:
- [ ]
Blocksubclass (or use vanilla Block with properties) - [ ] Register in
ModBlocks.BLOCKS/Registries.BLOCK - [ ] Register
BlockIteminModItems.ITEMS/Registries.ITEM - [ ] Blockstate JSON →
assets/<modid>/blockstates/<name>.json - [ ] Block model JSON →
assets/<modid>/models/block/<name>.json - [ ] Item model JSON →
assets/<modid>/models/item/<name>.json(or inherits from block) - [ ] 1.21.4+ item definition →
assets/<modid>/items/<name>.json, pointing at the item or block model - [ ] Texture PNG →
assets/<modid>/textures/block/<name>.png - [ ] Loot table JSON -> 1.21.x:
data/<modid>/loot_table/blocks/<name>.json; Forge 1.20.1:data/<modid>/loot_tables/blocks/<name>.json - [ ] Tags -> 1.21.x:
data/<modid>/tags/block/andtags/item/; Forge 1.20.1:data/<modid>/tags/blocks/andtags/items/ - [ ] Language entry in
en_us.json - [ ] Mine-with-correct-tool tag if hardness > 0
- [ ] Do not mix Forge 1.20.1 plural server-data paths with 1.21.x singular server-data paths
When adding a new item:
- [ ]
Itemsubclass (or usenew Item(properties)) - [ ] Register in
ModItems/Registries.ITEM - [ ] Item model JSON
- [ ] 1.21.4+ item definition →
assets/<modid>/items/<name>.json - [ ] Texture PNG
- [ ] Language entry
- [ ] Creative tab registration (NeoForge/Forge:
BuildCreativeModeTabContentsEvent; Fabric:ItemGroupEvents) - [ ] Recipe JSON if craftable (
data/<modid>/recipe/for 26.x; see the version-specific recipe reference before using a 1.21.x project)
When adding a new entity:
- [ ] Entity class (extends appropriate base:
Mob,Animal,TamableAnimal, etc.) - [ ]
EntityTyperegistration - [ ] Renderer class (
@OnlyIn(Dist.CLIENT)) - [ ] Model class (
@OnlyIn(Dist.CLIENT)) - [ ] Register renderer in
EntityRenderersEvent.RegisterRenderers(NeoForge) orEntityModelLayerRegistry(Fabric) - [ ] Spawn egg item (optional)
- [ ] Spawn rules / biome modifier
13. Open-Source Conventions
- License: MIT or LGPL-3.0 — include
LICENSEfile andSPDX-License-Identifierheader - Versioning:
{mod_version}+{mc_version}(e.g.,2.0.0+1.21.11) - Changelog: Keep
CHANGELOG.mdup to date with semver notes - Publishing: Use
gradle-modrinthorcurseforgegradleplugins for CurseForge / Modrinth - CI: GitHub Actions with
./gradlew buildand./gradlew runGameTestServer - PR conventions: Keep PRs scoped to a single feature; include asset files with Java changes
14. References
- NeoForge API patterns and event system:
./references/neoforge-api.md - Forge 1.20.1 API patterns and MDK workflow:
./references/forge-1.20.1-api.md - Fabric API patterns and mixin guide:
./references/fabric-api.md - Blocks, items, recipes, commands, GUIs, datagen:
./references/common-patterns.md - NeoForge official docs: https://docs.neoforged.net/
- Fabric developer docs: https://docs.fabricmc.net/develop/
- Architectury (multiloader): https://docs.architectury.dev/
- Minecraft Wiki (data formats): https://minecraft.wiki/w/Java_Edition_data_values
版本历史
-
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 实验室的评测报告。
亮点
- Comprehensive coverage of Minecraft modding across NeoForge, Forge, Fabric, and Architectury loaders
- Practical guidance for real-world development including build/test workflows, asset generation, and publishing
- Clear version differentiation between modern 26.x and legacy 1.20.1/1.21.x ecosystems
待提升项
-
Routing boundary clarity 原报告严重程度:轻微
Reference to minecraft-multiloader Skill lacks explicit trigger condition wording
改进建议:Add a concise sentence like 'Route to minecraft-multiloader only when building a single codebase that must compile against both NeoForge and Fabric simultaneously'
亮点
- Precise trigger verbs: create, modify, debug, migrate
- Explicit platform/version matrix prevents misrouting
- Clear exclusion rules for commands, datapacks, and plugins
待提升项
-
Document length 原报告严重程度:轻微
Main file exceeds 500-line guideline (~650 lines)
改进建议:Consider moving detailed JSON templates or advanced patterns to referenced files to keep main guide focused
-
Section heading consistency 原报告严重程度:轻微
'When to Use' guidance is embedded in 'Routing Boundaries' rather than as a standalone top-level section
改进建议:Promote routing guidance to a dedicated 'When to Use This Skill' section near the top for better visibility
亮点
- Logical progression from platform detection to implementation patterns
- Per-loader layout diagrams enhance understanding
- Task checklists provide actionable developer workflows
亮点
- Version-aware code examples prevent common mapping/constant errors
- Build/test commands follow standard Gradle conventions
- Side safety (@OnlyIn/@Environment) properly emphasized
- Asset-template coupling ensures complete mod packages
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- docs.architectury.dev
- docs.fabricmc.net
- docs.neoforged.net
- minecraft.wiki
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。