Player Head Drops Data Pack for Minecraft 1.13

This Player Head Drops Data Pack makes players drop their heads upon death by another player. Also, I’ve included a Ruby script tool that generates a loop function given the player’s in-game names or a whitelist file.

Player Head Drops Data Pack Download

Download the zip file and follow the instructions.

Personalize your player head drops

Once you have the file, unpack it and go to the data/phd/functions folder and edit the loop function (loop.mcfunction).

Add a command for each player on your server replacing PlayerIGN with your server members in-game names:

execute as @a[name=PlayerIGN,scores={phd.deaths=1..}] run give @a[scores={phd.kills=1..}] player_head{SkullOwner:”PlayerIGN”} 1

Save the file and zip the package again. Make sure to include the pack.mcmeta file and data folder.

Once that is done, copy the new zip file in your map folder, under “datapacks”. Go to Minecraft and execute the /reload command.

A message should display saying that the installation was successful.

Happy Hunting!

For specific instructions watch the video.

Generating the Loop Function for Player Head Drops Data Pack

In my YouTube video I explain why is better to have a certain type of format for the Player Heads and how the Ruby script I created can help.

Player Head Drops Infographic

To be able to run the script you need the latest version of Ruby installed and the httparty Gem.

Download the script here: phd_generator.rb

The script works two ways, the first one tries to find a whitelist.json file to parse and start sending requests with that information to build the Function for you. Copy or move the script (phd_generator.rb) and your whitelist file (whitelist.json) so they are in the same folder and run the script without parameters

ruby phd_generator.rb

The alternative is to give IGN’s as parameters to the script, for that just write the in-game name of your server members separated by spaces. For example:

ruby phd_generator.rb Player1 Player2 anotherPlayer

The generated loop function (loop.mcfunction) needs to be copied to the data/phd/functions folder in the data pack. Replace the old one, re-pack everything in a zip file and place it in your map’s “datapacks” folder. Don’t forget to /reload while in the game.

If you don’t know how to run this script I can run it and generate the loop file for you, feel free to contact me on Discord.

This project is also on GitHub if you want to contribute to the Function or the script.

If you want to see more content or just want to be in touch, here are some websites where you can find me

 Twitter   Discord   Mixer   Github

Can't get enough of the cat on the internet?