The NEW Modrinth Technologies™ website BETA is now live!!Learn moreTry it out
Just Player Heads

Just Player Heads

🗿 Allows the collection of player heads via command or death event.

Server AdventureDecorationGame MechanicsSocial

865 downloads
11 followers
Created7 months ago
Updated17 days ago

External resources



Project members

Serilum

Owner


Technical information

License
ARR
Client side
optional
Server side
required
Project ID



Requires the library mod Collective.

Just Player Heads is a minimalistic mod that allows the collection of player heads via a command or death event. All heads are generated similar to a mob head via texture-data, lag free. The mod procedurally retrieves texture data via the Mojang API, and can cache them locally after.

I've also got a Just Mob Heads mod available!


Configurable: ( how do I configure? )
enablePlayerHeadCaching (default = true): If enabled, enables the caching of player head textures. This fixes the limitations of the Mojang API, but does mean that whenever players update their skin the old head is still dropped until the server reboots or an administator uses the '/jph cache' command.
playerDropsHeadOnDeath (default = true): If enabled, allows players to drop their head on death.
playerHeadDropChance (default = 1.0, min 0.0001, max 1.0): Sets the chance of a player dropping their head if 'playerDropsHeadOnDeath' is enabled.


Texture values instead of generation via player-names
The mod uses texture values to generate the player heads. This means that there won't be any lag, which player-name generated heads usually cause.

Pure Vanilla Resources
Because the mod does not add any custom blocks, you may remove the mod and still have the heads previously gathered in-game.

In-game commands
If you want to generate a player head without any death event, you may do so via the jph command. Where the player name ignores capitalisation and the amount is optional (default amount is 1).
/jph <playerName> (amount)

To empty the player head texture cache (if enabled in the config) you can reboot the server or use the following command:
/jph cache

Mojang API request limitations
The mod uses the UUID -> Profile + Skin/Cape function of the Mojang API. This has quite a strict rate limit: You can request the same profile once per minute, however you can send as many unique requests as you like. This means that sometimes the mod is unable to generate a head if the API limits its generation. The texture caching feature can fix this by saving the head texture data locally.


------------------

You may freely use this mod in any modpack, as long as the download remains hosted within the Modrinth ecosystem.

Serilum.com contains an overview and more information on all mods available.

Comments are disabled as I'm unable to keep track of all the separate pages on each mod.
For issues, ideas, suggestions or anything else there is the Github repo. Thanks!