Just Player Heads (Legacy Fabric)
This concise mod provides the ability to obtain player heads in Minecraft. Heads are generated using texture data, eliminating the lag typically associated with creating heads through player names.
Main Features
The mod allows collecting player heads in two ways: through a special command or upon character death. All heads are procedurally generated using texture data from the Mojang API and can then be stored in a local cache for subsequent use.
Configuration Settings
The mod offers several parameters for customization:
-
enablePlayerHeadCaching (default = true): Enables caching of player head textures. This feature bypasses Mojang API limitations, but when a player updates their skin, the old head will continue to appear until the server restarts or an administrator uses the '/jph cache' command.
-
playerDropsHeadOnDeath (default = true): Allows player heads to drop upon death.
-
playerHeadDropChance (default = 1.0, min 0.0001, max 1.0): Determines the probability of a player head dropping upon death if the corresponding option is enabled.
In-Game Commands
To create a player head without requiring death, you can use the command /jph <player_name> (amount), where the player name is case-insensitive and the amount is an optional parameter (default is 1).
To clear the player head texture cache (if this feature is enabled in settings), you can restart the server or use the command /jph cache.
Operational Features
The mod uses the UUID → Profile + Skin/Cape function of the Mojang API, which has strict rate limits. The same profile can be requested no more than once per minute, but the number of unique requests is unlimited. This means that sometimes the mod may fail to generate a head due to API limitations. The texture caching feature solves this problem by storing head texture data locally.
Compatibility and Resources
Since the mod does not add custom blocks, it can be removed without losing previously collected heads in the game. All resources remain completely vanilla.
Requirements
For the mod to work, the Collective (Fabric) library mod and Fabric API are required.