{"id":19826243,"url":"https://github.com/aternosorg/sherlock","last_synced_at":"2026-02-09T12:14:45.743Z","repository":{"id":56950033,"uuid":"475485815","full_name":"aternosorg/sherlock","owner":"aternosorg","description":"PHP library to apply minecraft mappings to log files","archived":false,"fork":false,"pushed_at":"2024-02-09T17:41:24.000Z","size":61,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T15:10:40.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/aternos/sherlock","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aternosorg.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}},"created_at":"2022-03-29T14:41:56.000Z","updated_at":"2023-02-03T21:18:12.000Z","dependencies_parsed_at":"2023-02-01T11:16:53.747Z","dependency_job_id":null,"html_url":"https://github.com/aternosorg/sherlock","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Fsherlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Fsherlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Fsherlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Fsherlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aternosorg","download_url":"https://codeload.github.com/aternosorg/sherlock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224262074,"owners_count":17282267,"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-12T11:09:51.404Z","updated_at":"2026-02-09T12:14:45.679Z","avatar_url":"https://github.com/aternosorg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sherlock\n### About\nSherlock is a PHP library that investigates obscure Minecraft logs\nand makes them more readable by replacing obfuscated stacktraces\nwith useful names using Mappings provided by Mojang (or FabricMC).\n\n### Installation\n```\ncomposer require aternos/sherlock\n```\n\n## Usage\n\n### Getting an Obfuscation Map\nTo process a log you need the correct Obfuscation Map.\nYou can get the url of a Vanilla Obfuscation Map for any Minecraft version \n(including snapshots) using the LauncherMetaMapLocator:\n```php\n$url = new \\Aternos\\Sherlock\\MapLocator\\LauncherMetaMapLocator(\"1.18.2-pre1\", \"server\");\n$map = new \\Aternos\\Sherlock\\Maps\\URLVanillaObfuscationMap($url)\n```\nThe second parameter in this example is the mapping type. Mojang releases both server \nand client Obfuscation Maps, so you will have to pick the one that matches your environment.\n\n#### Fabric\nFabric logs are already mapped from Vanilla's obfuscated names to Intermediary. \nThese are different mappings that aim to keep names consistent across multiple versions.\nTo process such a log you need the corresponding Yarn mappings. You can get the URL to a gzip \nmap file from the Fabric Maven repository like this:\n```php\n$url = new \\Aternos\\Sherlock\\MapLocator\\FabricMavenMapLocator(\"1.18.2-pre1\");\n$map = new \\Aternos\\Sherlock\\Maps\\GZURLYarnMap($url);\n```\nYarn mappings are not environment dependent since Intermediary already takes care of the differences.\n\n#### Caching Map contents\nWhen you have created an Obfuscation Map you can get the raw content using the getContent() method. \nYou can cache that to reduce requests to the APIs that are used to retrieve them.\nWhen you want to create an Obfuscation Map from a string directly you can create an instance of\nVanillaObfuscationMap and YarnMap directly.\n\n### Remapping a log using the Obfuscation Map\n```php\n$log = new \\Aternos\\Sherlock\\ObfuscatedString(file_get_contents(\"test.log\"), $map);\n$remappedContent = $log-\u003egetMappedContent();\nfile_put_contents(\"test.mapped.log\", $remappedContent)\n```\nThe content will only be mapped once you try to retrieve it and will be stored from then on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternosorg%2Fsherlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faternosorg%2Fsherlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternosorg%2Fsherlock/lists"}