Download the PHP package aternos/sherlock without Composer
On this page you can find all versions of the php package aternos/sherlock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aternos/sherlock
More information about aternos/sherlock
Files in aternos/sherlock
Package sherlock
Short Description PHP library to apply minecraft mappings to log files
License MIT
Informations about the package sherlock
Sherlock
About
Sherlock is a PHP library that investigates obscure Minecraft logs and makes them more readable by replacing obfuscated stacktraces with useful names using Mappings provided by Mojang (or FabricMC).
Installation
Usage
Getting an Obfuscation Map
To process a log you need the correct Obfuscation Map. You can get the url of a Vanilla Obfuscation Map for any Minecraft version (including snapshots) using the LauncherMetaMapLocator:
The second parameter in this example is the mapping type. Mojang releases both server and client Obfuscation Maps, so you will have to pick the one that matches your environment.
Fabric
Fabric logs are already mapped from Vanilla's obfuscated names to Intermediary. These are different mappings that aim to keep names consistent across multiple versions. To process such a log you need the corresponding Yarn mappings. You can get the URL to a gzip map file from the Fabric Maven repository like this:
Yarn mappings are not environment dependent since Intermediary already takes care of the differences.
Caching Map contents
When you have created an Obfuscation Map you can get the raw content using the getContent() method. You can cache that to reduce requests to the APIs that are used to retrieve them. When you want to create an Obfuscation Map from a string directly you can create an instance of VanillaObfuscationMap and YarnMap directly.
Remapping a log using the Obfuscation Map
The content will only be mapped once you try to retrieve it and will be stored from then on.
All versions of sherlock with dependencies
ext-curl Version *
ext-simplexml Version *
ext-zlib Version *