Loading...
Loading...
Comprehensive guidance for Minecraft mod development with Fabric, including porting from other mod loaders (Forge, NeoForge). Integrates MCP servers for decompilation, documentation access, and mixin validation. Use when developing Fabric mods, porting from Forge, or working with Minecraft source code.
npx skill4agent add mcdxai/meteor-rejects-v2 minecraft-fabric-devsync_fabric_docs (force: false) → Get latest Fabric docs
baritone_refresh_docs → Get Baritone docs if neededlist_fabric_versions → See available Fabric versions
list_minecraft_versions → See available/cached Minecraft versionsdecompile_minecraft_version (version, mapping: "yarn", force: false)abc# Still use yarn as primary for Fabric development
decompile_minecraft_version (version: "1.21.11", mapping: "yarn")
decompile_minecraft_version (version: "1.22-experimental", mapping: "yarn")
# Both work identically, server handles the difference# Comparing old (obfuscated) to new (de-obfuscated)
compare_versions (
fromVersion: "1.21.11", # Obfuscated official
toVersion: "1.22", # De-obfuscated official
mapping: "yarn" # Consistent naming across both
)# Works for both obfuscated and de-obfuscated
get_minecraft_source (version, className, mapping: "yarn")
# Server internally detects:
# - Is this version obfuscated? → Apply traditional deobfuscation
# - Is this version de-obfuscated? → Use direct mapping translationStep 1: Find the class
→ search_fabric_docs (query: "entity", mcVersion: "latest")
→ search_minecraft_code (version, query: "Entity", searchType: "class", mapping: "yarn")
Step 2: Get source code
→ get_minecraft_source (version, className: "net.minecraft.entity.Entity", mapping: "yarn")
Step 3: Get documentation context
→ get_documentation (className: "Entity")
→ get_fabric_doc (path: "develop/entities.md", mcVersion: "latest")Step 1: Understand the target
→ get_minecraft_source (version, className: "[target]", mapping: "yarn")
→ get_fabric_doc (path: "develop/mixins.md", mcVersion: "latest")
Step 2: Write mixin code
[User writes mixin based on source + docs]
Step 3: Validate mixin
→ analyze_mixin (source: "[mixin code]", mcVersion: "[version]", mapping: "yarn")
Step 4: Fix issues
[Review validation results, make corrections]
→ analyze_mixin (source: "[updated code]", mcVersion: "[version]", mapping: "yarn")Step 1: Identify what needs widening
→ get_minecraft_source (version, className: "[class]", mapping: "yarn")
[Check field/method visibility]
Step 2: Create access widener file
[Write .accesswidener with proper syntax]
Step 3: Validate
→ validate_access_widener (content: "[file content]", mcVersion: "[version]", mapping: "yarn")
Step 4: Apply fixes from validation
[Update based on validation results]accessWidener v2 named
accessible class net/minecraft/class/Name
accessible method net/minecraft/class/Name methodName (Lparams;)Lreturn;
accessible field net/minecraft/class/Name fieldName Ltype;
extendable class net/minecraft/class/Name
mutable field net/minecraft/class/Name fieldName Ltype;Step 1: Extract mod metadata
→ analyze_mod_jar (jarPath: "[path]", includeAllClasses: false, includeRawMetadata: true)
Step 2: Examine mixins (if present)
→ analyze_mixin (source: "[jar path]", mcVersion: "[version]", mapping: "yarn")
Step 3: Check dependencies and entry points
[Review metadata from Step 1]
Step 4: Decompile/remap if needed
→ remap_mod_jar (inputJar, outputJar, mcVersion, toMapping: "yarn")/mnt/c/...C:\...Step 1: Get high-level overview
→ compare_versions (fromVersion, toVersion, mapping: "yarn", category: "all")
Step 2: Detailed API changes
→ compare_versions_detailed (fromVersion, toVersion, mapping: "yarn",
packages: ["net.minecraft.entity", "net.minecraft.world"], maxClasses: 500)
Step 3: Check registry changes
→ get_registry_data (version: "[old]", registry: "blocks")
→ get_registry_data (version: "[new]", registry: "blocks")
Step 4: Search for specific changes
→ search_fabric_docs (query: "migration [version]", mcVersion: "all")Step 1: Analyze Forge mod
→ analyze_mod_jar (jarPath: "[forge-mod.jar]", includeAllClasses: true, includeRawMetadata: true)
Step 2: Understand Forge-specific code
[Review: @Mod annotations, event handlers, capability system, sided proxies]
Step 3: Find Fabric equivalents
→ search_fabric_docs (query: "[forge concept]", mcVersion: "latest")
→ get_fabric_doc (path: "develop/[topic].md", mcVersion: "latest")
Step 4: Map common patterns
Forge Events → Fabric Events (different registration)
Capabilities → Cardinal Components API or custom solution
@Mod annotation → fabric.mod.json
FMLJavaModLoadingContext → Fabric Mod Initializer
DeferredRegister → Registry.register in onInitialize
Step 5: Check Minecraft version compatibility
→ get_minecraft_source (version, className: "[needed class]", mapping: "yarn")
→ compare_versions (fromVersion: "[forge ver]", toVersion: "[fabric ver]", mapping: "yarn")
Step 6: Validate converted mixins
[If Forge mod uses CoreMods/ASM]
→ analyze_mixin (source: "[converted mixin]", mcVersion, mapping: "yarn")| Forge Pattern | Fabric Equivalent |
|---|---|
| |
| Event callbacks in respective classes |
| Direct method registration with event |
| Capabilities | Cardinal Components API (separate library) |
| Direct |
| Config (ForgeConfig) | Cloth Config API or custom solution |
| |
| Network packets (SimpleChannel) | Fabric Networking API |
| |
fabric.mod.jsonmods.tomlmodid.mixins.jsonStep 1: Index the version (one-time, enables fast search)
→ index_minecraft_version (version, mapping: "yarn")
Step 2: Fast full-text search
→ search_indexed (query: "entity damage", version, mapping: "yarn",
types: ["method", "field"], limit: 100)
Alternative: Direct search (slower, no index needed)
→ search_minecraft_code (version, query: "damage", searchType: "all",
mapping: "yarn", limit: 50)"class""method""field""content""all"find_mapping (symbol: "a", version: "1.21.11", sourceMapping: "official", targetMapping: "yarn")
find_mapping (symbol: "Entity", version: "1.21.11", sourceMapping: "mojmap", targetMapping: "yarn")
find_mapping (symbol: "class_1234", version: "1.21.11", sourceMapping: "intermediary", targetMapping: "yarn")# Official names are now readable, but still translate to yarn for consistency
find_mapping (symbol: "Entity", version: "1.22", sourceMapping: "official", targetMapping: "yarn")
find_mapping (symbol: "LivingEntity", version: "1.22", sourceMapping: "official", targetMapping: "intermediary")# Works across obfuscated/de-obfuscated boundary
find_mapping (symbol: "Entity", version: "1.21.11", sourceMapping: "yarn", targetMapping: "yarn")
find_mapping (symbol: "Entity", version: "1.22", sourceMapping: "yarn", targetMapping: "yarn")
# Yarn provides consistency even as official format changes# Get all registries
get_registry_data (version, registry: undefined)
# Get specific registry
get_registry_data (version, registry: "blocks")
get_registry_data (version, registry: "items")
get_registry_data (version, registry: "entities")
get_registry_data (version, registry: "biomes")# Feature implementation
search_fabric_docs (query: "custom blocks", mcVersion: "latest", limit: 15)
get_fabric_doc (path: "develop/blocks.md", mcVersion: "latest")
# Concept learning
list_fabric_sections (mcVersion: "latest")
get_fabric_doc_headings (path: "develop/mixins.md", mcVersion: "latest")# When you need to see how vanilla does it
get_minecraft_source (version, className: "BlockItem", mapping: "yarn")
search_minecraft_code (version, query: "registerBlock", searchType: "method", mapping: "yarn")# Only for pathfinding/AI mods
baritone_search_docs (query: "GoalBlock")
baritone_read_doc (path: "baritone/api/pathing/goals/GoalBlock.md")decompile_minecraft_versionget_minecraft_sourcesync_fabric_docsbaritone_refresh_docsfind_mappinganalyze_mixinvalidate_access_widenercompare_versionsget_registry_dataUser wants to...
├─ Understand Minecraft code
│ ├─ Find a class → search_minecraft_code (searchType: "class")
│ ├─ See implementation → get_minecraft_source
│ └─ Find all usages → search_indexed (after indexing)
│
├─ Learn Fabric concepts
│ ├─ Browse topics → list_fabric_sections
│ ├─ Search for feature → search_fabric_docs
│ └─ Read full guide → get_fabric_doc
│
├─ Write a mixin
│ ├─ Get target class → get_minecraft_source
│ ├─ Check Fabric mixin docs → get_fabric_doc (path: "develop/mixins.md")
│ └─ Validate mixin → analyze_mixin
│
├─ Access private members
│ ├─ Check what exists → get_minecraft_source
│ ├─ Write access widener → [user writes]
│ └─ Validate → validate_access_widener
│
├─ Port a mod
│ ├─ Analyze original → analyze_mod_jar
│ ├─ Check Forge→Fabric patterns → search_fabric_docs
│ ├─ Compare MC versions → compare_versions_detailed
│ └─ Validate converted code → analyze_mixin
│
├─ Update for new version
│ ├─ High-level changes → compare_versions
│ ├─ Detailed API diff → compare_versions_detailed
│ ├─ Registry changes → get_registry_data (both versions)
│ └─ Migration guide → search_fabric_docs (query: "migration")
│
└─ Understand mappings
├─ Translate obfuscated → find_mapping
├─ See all mappings → List available in tool
└─ Convert between systems → find_mapping
// Your mixin code hereanalyze_mixin (source: "[above code]", mcVersion: "1.21.11", mapping: "yarn")accessWidener v2 named
[entries here]validate_access_widener (content: "[above content]", mcVersion: "1.21.11", mapping: "yarn")index_minecraft_version (version, mapping: "yarn")decompile_minecraft_versionget_minecraft_sourceget_registry_datasearch_minecraft_codeanalyze_mixinvalidate_access_widenercompare_versionslist_minecraft_versions → See what's available
list_fabric_versions → See what Fabric supportslist_minecraft_versionslist_fabric_versionsdecompile_minecraft_version# Use yarn for consistent names across versions
decompile_minecraft_version (version: "1.21.11", mapping: "yarn")
decompile_minecraft_version (version: "1.22-experimental", mapping: "yarn")
# Compare versions safely
compare_versions_detailed (
fromVersion: "1.21.11", # Obfuscated
toVersion: "1.22", # De-obfuscated
mapping: "yarn" # Consistent across both
)Let me help you create a fall damage prevention mixin for Fabric.
Step 1: Understanding the vanilla implementation
[get_minecraft_source for LivingEntity with fall damage logic]
Step 2: Checking Fabric mixin documentation
[get_fabric_doc for mixins guide]
Step 3: Creating the mixin
[Full mixin code with proper imports and structure]
Step 4: Validation (CRITICAL - run this!)
analyze_mixin (
source: "[mixin code above]",
mcVersion: "1.21.11",
mapping: "yarn"
)
This mixin injects into the fall damage method and cancels it. The @Inject annotation targets the method responsible for applying fall damage, and we use cancellable = true to allow preventing the damage.
Important notes:
- Test in creative world first
- May conflict with other fall damage mods
- Affects all entities, not just playersfabric://docs/{path}fabric://docs/develop/getting-started.md
fabric://docs/develop/mixins.md
fabric://docs/items/custom-item.mdget_fabric_docminecraft://source/{version}/{mapping}/{className}minecraft://source/1.21.1/yarn/net.minecraft.entity.Entity
minecraft://source/1.21.1/mojmap/net.minecraft.world.level.Levelminecraft://mappings/{version}/{mapping}minecraft://registry/{version}/{registryType}minecraft://versions/listminecraft://index/{version}/{mapping}sync_fabric_docs
list_minecraft_versions
decompile_minecraft_version (version: "1.21.11", mapping: "yarn")get_fabric_doc (path: "develop/[topic].md")
get_minecraft_source (version, className, mapping: "yarn")
analyze_mixin (source, mcVersion, mapping: "yarn")analyze_mod_jar (jarPath)
compare_versions (fromVersion, toVersion, mapping: "yarn")
search_minecraft_code (version, query, searchType: "all", mapping: "yarn")analyze_mixin (source, mcVersion, mapping: "yarn")
validate_access_widener (content, mcVersion, mapping: "yarn")