Head Extractor is a tool and library to extract the player profile from the player heads in a Minecraft world.
This is accomplished somewhat inefficiently by searching chunk NBT, player data NBT, and entity NBT for lists of
Compound tags that contain a String tag named Value.
In addition, mcfunction and json files in data packs are scanned for Base64 encoded player profiles.
- Clone the repository
- Run
./gradlew buildorgradlew.bat build - Tool is located at
build/libs/HeadExtractor-<VERSION>-all.jar
java -jar HeadExtractor-<VERSION>-all.jar [OPTIONS] <WORLD DIRECTORIES>
Options:
--exclude-entities: Exclude heads carried by entities--exclude-region: Exclude heads placed in the world and in containers--exclude-playerdata: Exclude heads in players' inventories--exclude-datapacks: Exclude base64-encoded player profiles in .json or .mcfunction files in datapacks
There is also a corresponding --include option for each of the above. The default behavior is to include all heads.
Player profiles are sent line by line to standard output.
You can include this library in your project from jitpack.io!
- Gradle:
- Add
maven { url 'https://jitpack.io' }to the end of your repositories section - Add the dependency
implementation 'com.github.<user>:HeadExtractor:<version>'- Replace
<user>with the owner of the fork you would like to use - Replace
<version>with the tag of the GitHub Release you would like to use- You can also use
main-SNAPSHOTto take the latest commit frommain
- You can also use
- Replace
- Add
- Maven:
- Add the repository to the end of your repositories section:
<repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository>
- Add the dependency:
<dependency> <groupId>com.github.User</groupId> <artifactId>HeadExtractor</artifactId> <version>Version</version> </dependency>
- Replace
Userwith the owner of the fork you would like to use - Replace
Versionwith the tag of the GitHub Release you would like to use- You can also use
main-SNAPSHOTto take the latest commit frommain
- You can also use
- Replace
- Add the repository to the end of your repositories section:
You can also include the compiled jar as a library using your preferred method.
Once you've included the library, all you need to do is call
me.amberichu.headextractor.HeadExtractor#extractHeads(Set<Path> worldPaths, boolean includeEntities, boolean includeRegion, boolean includePlayerData, boolean includeDataPacks)!