{"id":18448508,"url":"https://github.com/ccbluex/yarn_remapper","last_synced_at":"2025-10-30T06:14:12.523Z","repository":{"id":221613030,"uuid":"740609255","full_name":"CCBlueX/yarn_remapper","owner":"CCBlueX","description":"A Rust library for remapping Minecraft's Yarn named mappings to obfuscated identifiers.","archived":false,"fork":false,"pushed_at":"2024-01-08T17:50:26.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T23:17:51.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CCBlueX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-08T17:36:41.000Z","updated_at":"2024-12-09T17:08:41.000Z","dependencies_parsed_at":"2024-02-09T02:08:58.837Z","dependency_job_id":"5208c35b-e783-4f6e-9caf-3c298abe54b2","html_url":"https://github.com/CCBlueX/yarn_remapper","commit_stats":null,"previous_names":["ccbluex/yarn_remapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CCBlueX%2Fyarn_remapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CCBlueX%2Fyarn_remapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CCBlueX%2Fyarn_remapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CCBlueX%2Fyarn_remapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CCBlueX","download_url":"https://codeload.github.com/CCBlueX/yarn_remapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249058983,"owners_count":21206061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T07:16:06.928Z","updated_at":"2025-10-30T06:14:12.518Z","avatar_url":"https://github.com/CCBlueX.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yarn Remapper\n\n`yarn_remapper` is a Rust library that remaps Minecraft Yarn named mappings to their obfuscated counterparts. It parses the TINY v2 mapping format provided by FabricMC and enables the remapping of class names, method names, field names, and their descriptors. This tool is essential for accessing obfuscated classes, fields, and methods via the Java Native Interface (JNI) and is a foundational component of [LiquidBounce Lite](https://github.com/CCBlueX/liquidbounce_lite), a Minecraft DLL injection client written in Rust.\n\n## How it Works\n\nThe `yarn_remapper` library leverages the TINY v2 mapping format, which uses hierarchical sections to define mappings between named, intermediary, and official obfuscated class names, method names, field names, and descriptors. These mappings help transform names from the readable Yarn mappings to the obfuscated names used in Minecraft's official releases.\n\nExample of a TINY v2 format snippet:\n```plaintext\ntiny\t2\t0\tofficial\tintermediary\tnamed\nc\ta\tclass_123\tpkg/SomeClass\n\tf\t[I\ta\tfield_789\tsomeField\n\tm\t(III)V\ta\tmethod_456\tsomeMethod\n\t\tp\t1\t\tparam_0\tx\n\t\tp\t2\t\tparam_1\ty\n\t\tp\t3\t\tparam_2\tz\nc\tb\tclass_234\tpkg/xy/AnotherClass\n\tm\t(Ljava/lang/String;)I\ta\tmethod_567\tanotherMethod\n```\n\n## Installation\nAdd yarn_remapper to your Cargo.toml dependencies:\n\n```toml\n[dependencies]\nyarn_remapper = \"0.2.0\"\n```\nEnsure you have downloaded the mapping file required for remapping:\n\nTINY v2 Mapping File: [yarn-1.20.4-rc1+build.1-mergedv2.jar](https://maven.fabricmc.net/net/fabricmc/yarn/1.20.4%2Bbuild.1/yarn-1.20.4%2Bbuild.1-mergedv2.jar)\n\n## Usage\nHere's an example of how to use yarn_remapper in your Rust project:\n\n```rust\nuse yarn_remapper::{Mapping};\nuse yarn_remapper::mapping::MappingLoader;\nuse yarn_remapper::tiny_v2::TinyV2Mapping;\nuse std::path::Path;\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n    // Path to the TINY v2 mapping file\n    let path = Path::new(\"path/to/mappings.tiny\");\n    \n    // Parse mappings\n    let mapping = TinyV2Mapping::load(\u0026path)?;\n\n    // Remap a class name\n    if let Some(obfuscated_name) = mapping.remap_class(\"net/minecraft/client/MinecraftClient\") {\n        println!(\"Obfuscated class name: {}\", obfuscated_name);\n    }\n\n    // Remap a method name with descriptor\n    if let Some(obfuscated_method_name) = mapping.remap_method(\"net/minecraft/client/MinecraftClient\", \"getWindowTitle\", \"()Ljava/lang/String;\") {\n        println!(\"Obfuscated method name: {}\", obfuscated_method_name);\n    }\n\n    // Remap a field name with descriptor\n    if let Some(obfuscated_field_name) = mapping.remap_field(\"net/minecraft/client/MinecraftClient\", \"inGameHud\", \"Lnet/minecraft/client/gui/hud/InGameHud;\") {\n        println!(\"Obfuscated field name: {}\", obfuscated_field_name);\n    }\n\n    Ok(())\n}\n```\n\n## License\nThis project is licensed under the GNU GPLv3 License - see the LICENSE file for details.\n\n## Contributions\nContributions are welcome! Please open a pull request or an issue to contribute to the project or suggest improvements.\n\n\u003e This project is not affiliated with Mojang or Minecraft.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccbluex%2Fyarn_remapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccbluex%2Fyarn_remapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccbluex%2Fyarn_remapper/lists"}