File size: 1,891 Bytes
d517dc9 | 1 2 3 4 5 | {"type": "session", "harness": "opencode", "id": "mc-0033", "name": "Mapping file formats: .tsrg, .tiny, .srg, .mcp format explained"}
{"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": "Explain the different mapping file formats used in Minecraft modding."}}
{"type": "message", "message": {"role": "assistant", "content": "Minecraft modding uses several mapping file formats:\n\n**TSRG (Tiny SRG)** - Forge/NeoForge format:\n```\nnet/minecraft/block/Block {\n\tfield_12345 Lnet/minecraft/block/BlockState; -> state\n\tmethod_12345 (Lnet/minecraft/world/World;)V -> onBlockActivated\n}\n```\n\n**Tiny v2** - Fabric Intermediary format:\n```\nV2 intermediary named\nnet/minecraft/block/Block\nfield\tfield_12345\tLnet/minecraft/block/BlockState;\tstate\nmethod\tmethod_12345\t(Lnet/minecraft/world/World;)V\tonBlockActivated\n```\n\n**SRG** - Legacy MCP format:\n```\npublic net/minecraft/block/Block field_12345 -> state\npublic net/minecraft/block/Block method_12345()V -> onBlockActivated\n```\n\n**ProGuard/Mojang** - Official Mojang format:\n```\nclass net/minecraft/block/Block\n\tfield_12345 Lnet/minecraft/block/BlockState; = \"state\" Lnet/minecraft/block/BlockState;\n\tmethod_12345 (Lnet/minecraft/world/World;)V = \"onBlockActivated\" (Lnet/minecraft/world/World;)V\n```\n\n**Converting between formats with mapping-io:**\n```java\nMappingFormat inputFormat = MappingFormat.TSRG_2;\nMappingFormat outputFormat = MappingFormat.TINY_V2;\nMappings mappings = Mappings.create();\nMappingReader.get(inputFormat).read(Paths.get(\"input.tsrg\"), mappings);\nMappingWriter.get(outputFormat).write(mappings, Paths.get(\"output.tiny\"));\n```"}}
|