|
Download mc/mc-0035.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/mc/mc-0035.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm/mc/mc-0035.jsonl
-
curl -L -o mc-0035.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/mc/mc-0035.jsonl
2.42 kB
| {"type": "session", "harness": "opencode", "id": "mc-0035", "name": "Migrating mods from MCP to Mojang mappings"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert Minecraft modder who understands mapping systems (Mojang, Yarn, Intermediary) and how to work with unobfuscated/deobfuscated Minecraft source code."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do I migrate my existing mod from MCP/SRG to Mojang mappings?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Migrating from MCP to Mojang mappings involves updating all member names in your codebase.\n\n**Step 1: Update build configuration:**\n```groovy\n// Old (Forge with MCP)\ndependencies {\n minecraft 'net.minecraftforge:forge:1.20.4-49.0.1'\n mappings 'official' // or channel 'mcp' version '1.20.4'\n}\n\n// New (NeoForge or Fabric with Mojmap)\ndependencies {\n minecraft 'com.mojang:minecraft:1.20.4'\n mappings loom.officialMojangMappings()\n}\n```\n\n**Step 2: Automated name replacement:**\n```python\nimport csv\nimport os\n\ndef load_mcp_to_mojang(csv_path):\n mapping = {}\n with open(csv_path) as f:\n reader = csv.DictReader(f)\n for row in reader:\n mapping[row['searge']] = row['mcp']\n mapping[row['mcp']] = row['mojmap']\n return mapping\n\nmapping = load_mcp_to_mojang('mcp_to_mojang.csv')\n\nfor root, dirs, files in os.walk('src/main/java'):\n for file in files:\n if file.endswith('.java'):\n path = os.path.join(root, file)\n with open(path) as f:\n content = f.read()\n for old, new in mapping.items():\n content = content.replace(old, new)\n with open(path, 'w') as f:\n f.write(content)\n```\n\n**Step 3: Update Mixins:**\n```java\n// Old (MCP names)\n@Inject(method = \"func_12345_\", at = @At(\"HEAD\"))\n\n// New (Mojang names)\n@Inject(method = \"onBlockActivated\", at = @At(\"HEAD\"))\n```\n\n**Step 4: Update Access Transformers:**\n```access_transformer\n# Old (SRG names)\npublic net.minecraft.block.Block field_12345 # state\n\n# New (Mojang names)\npublic net.minecraft.block.Block stateDefinition # stateDefinition\n```\n\n**Common name changes:**\n| MCP/SRG | Mojang |\n|---------|--------|\n| func_12345 | method_name |\n| field_12345 | fieldName |\n| p_12345_ | parameterName |"}} | |