Use this skill for a Fabric 1.21.4 mod project on Windows.
For all user-facing guidance, follow modcrafting-start: explain outcomes in the user's language, keep tool names and protocol details internal, and continue the requested work. For onboarding or visual creation, call modcrafting_open_workbench with the current project (content/textures/recipe/gui as appropriate); merely returning an environment browserUrl does not open a browser. Never claim it opened unless the opener reports success, and even then say the system was asked to open it.
- Start with
modcrafting_environment_statusandfabric_project_inspect. - Before registering a block, item, entity, enchantment, or recipe, call
minecraft_data_lookupfor every vanilla ID and property used, passing the task's projectPath. Do not invent IDs or hardness, resistance, stack-size, or enchantment data from memory. - Use
fabric_docs_searchfor Fabric APIs andmc_wiki_searchfor game concepts, always with the same projectPath. When a lookup reports the knowledge base missing, runmodcrafting_prepare_assetsonce with that projectPath; resources are stored under the project's.modcrafting/knowledge. - Begin each chat task with
modcrafting_session({action:"create",projectPath}). Make narrow edits with the host Agent's normal file tools, then callfabric_validateand startfabric_build_start({sessionId,projectPath,task:"build"}). Pass that same sessionId to status and stop calls; only resume it explicitly when continuing an older task. - Poll with
fabric_job_status; interpret failures from Gradle output before attempting another edit.
For new content, use fabric_content_workspace(action="template", kind=...) to obtain supported defaults instead of guessing parameters; then customize, preview and save. The template is data only, does not write files and does not replace required vanilla-data lookup.
The plugin does not install a JDK. The environment check and builds resolve the same JDK 21 in this order: toolchain.json → MODCRAFTING_JAVA_HOME → JAVA_HOME → PATH → common installation scan; the resolved home is passed to Gradle. modcrafting_toolchain can persist a JDK 21 path without restarting Qoder. MCP scaffolding includes the pinned Windows Gradle Wrapper; existing projects must provide gradlew.bat. First builds may download Gradle and dependencies. Report actual storage paths; do not move/delete old caches or hardcode machine paths.
For visual recipes, obtain browserUrl from modcrafting_environment_status when using --web. The browser and fabric_recipe_workspace share the same project files. Use action catalog/list/read/save. Before updating, read and pass the exact revision as expectedRevision; use null only for a new ID. On RECIPE_CONFLICT, read and compare instead of blindly overwriting. Five vanilla serializers are editable: shaped, shapeless, smelting, blasting, stonecutting. Unsupported serializers or ingredient forms remain read-only. Saving requires rebuild/restart or explicit game reload before testing. Avoid ambiguous inputs matching vanilla recipes and verify the actual output in game.
For visual content parameters, use fabric_content_workspace list/read/preview/save and the same browser project. Supported declarative types are item, food, block, entity, tool and armor. Read the document; preview with its expectedRevision (null for a new ID), review changed files, then save with the returned previewRevision and the same expectedRevision. A conflict requires read/compare; never bypass it. Handwritten or externally modified generated Java is read-only. Custom textures must reference an existing project PNG; vanilla previews use an optional local cache and may show a labeled type illustration. Entities use the selected pig/zombie AI, collision and attributes. The browser appearance studio can paint the vanilla-layout skin or define up to 32 custom cuboids; saving writes the PNG, appearance data and generated EntityModel/LivingEntityRenderer in one revision-checked transaction. Custom textures are 64×32/64×64 for base skins and 256×256 for custom models; the 3D preview is approximate. Item/food/block/tool/armor content also exposes a direct texture painter and writes the corresponding item or block PNG. The separate texture workspace manages GUI/HUD PNGs under assets/<modid>/textures/gui; reference them from a GUI image element (for health-bar art, buff icons or other HUD pictures). Sword mining rules and armor appearance follow vanilla types/materials. Rebuild and restart before validating Java changes. Observer capability revision 5 exposes food/block/entity parameters and integrated-server equipment attributes; client attack/knockback attributes may lag. Validate actual effects and cleanup, not only command dispatch or generated source.
For AI item textures, use fabric_texture_workspace and complete the loop yourself in one turn without asking the user to perform manual steps: call prompt for a generation brief, generate a square PNG with your own image tool, then import (sourcePath or sourceBase64), save, and bind when a content object exists or is being created; report quality results, the saved texture and the rebuild/restart reminder once at the end. The tool removes the background, applies Minecraft-aware pixelization, palette/outline/dither rules and quality checks, and stores a candidate. preview is read-only; save requires both the current texture revision and the previewRevision, and bind updates an existing content object through the normal content revision checks. Only PNG is accepted, sizes are 16/32/64, and Alpha must be binary. Offer the browser textures module as an optional pixel-level polish surface for users unsatisfied with the result, never as a required manual stage. Never claim the texture looks correct from generated bytes alone: rebuild, restart, and treat screenshots as visual evidence rather than an automated PASS.
For MC UI creation, use fabric_gui_workspace template/list/read/preview/save and the MC interface editor in browserUrl. template returns a data-only layout and supported component defaults; it does not write files. Supported layouts are custom-screen, option-list and hud-overlay. Use stable unique IDs, GUI-pixel coordinates, native button/toggle/slider controls and labels/panels/display slots. Labels may bind to local control values or player health/food. Buttons only close, reset defaults or increment a chosen slider; no arbitrary scripts or commands. Display slots are not server containers. Read the current revision; preview generated files with expectedRevision, then save with both expectedRevision and previewRevision. Conflicts preserve drafts; external Java is read-only. Rebuild/restart, press the configured key in game, validate actual widget messages/geometry and persisted configuration. Screen closes via its close button or normal Esc; HUD key toggles visibility. Browser interaction only simulates state. HUD trace assertions remain INCONCLUSIVE in the existing engine; report fresh native draw observations/screenshots separately, never as an automatic HUD PASS.