Skins - MarkusBordihn/BOs-Easy-NPC GitHub Wiki

NPC Skins ๐ŸŽญ

Bring your NPCs to life with unique skins! The skin configuration screen offers plenty of options to make each NPC stand out.

Skin Sources ๐Ÿงญ

Easy NPC knows four ways to give an NPC its look:

Source Where it comes from Works for
Default skin Built into the mod All NPC types
Player skin A Minecraft account name Humanoid-style NPCs
URL skin A remote image link Humanoid-style NPCs
Custom skin A PNG in config/easy_npc/skin All NPC types with a skin list

NPCs that render a foreign model do not use this screen at all - a Doppler NPC takes the look of its target entity, a Cobblemon NPC its species, and an Easy Model NPC its model profile. See CustomModels and ModIntegration.

Default Skins ๐Ÿง‘โ€๐ŸŽจ

Quickly give your NPCs a fresh look by choosing from a variety of built-in skins. Just select one from the list, and itโ€™s instantly applied.

Default Skin

The available skins vary based on the NPC type. For example, Villager NPCs have more skin options than Humanoid NPCs.

Default Skin

Player Skins ๐ŸŽฎ

Want your Humanoid NPCs to wear a Minecraft player's skin? Just enter the player's name, click " Add," and your NPC will mirror their look. Any updates the player makes to their skin will automatically update on the NPC too!

Player Skin

URL Skins ๐ŸŒ

Add a personal touch with remote URL skins! Paste the URL of any online skin into the configuration screen, click "Add," and watch your NPC transform instantly.

To keep things running smoothly, Easy NPC uses a local cache, so server performance wonโ€™t take a hit.

Remote URL Image Link

Remote URL Skin

Note: Be cautious with short-lived URLs, like those from Discord. These links can expire, causing the skin to disappear for new players or after some time.

Server Limits for URL Skins ๐Ÿ”

URL skins are guarded, because the image is downloaded on every client:

  • The download is capped at 4 MB; larger images are rejected.
  • At most 5 redirects are followed, and every hop is validated again.
  • Adding a URL skin requires the URL_RESOURCE feature (default: creative player). See Permissions.

Servers can additionally reject URLs that point into their own network in config/easy_npc/remote_texture.cfg:

blockPrivateAddresses=true

This blocks loopback, private, and link-local addresses, including redirect targets. Recommended for public servers.

Custom Skins ๐Ÿ“‚

Unleash your creativity with custom skins! You can use your own images stored locally. Just save your skins in the config/easy_npc/skin folder in your Minecraft directory, with subfolders for each NPC type.

Custom Skin Folder

After adding your skins, click "Reload Custom Textures" to see them in-game.

Custom Skin

Custom skins are perfect for mod packs, making it easy to deploy unique NPC appearances. ๐ŸŽฎ

Custom skins can also be set with a command, by file name (without .png) or skin UUID:

/easy_npc skin set custom <NPC> <name>

The command keeps the current skin layer setting. If the server has the skin, but for another NPC type, the command fails instead of setting an invisible skin.

Server Skins ๐ŸŒ

Players no longer need every custom skin locally. Put the skins on the server into the same folder structure, config/easy_npc/skin/<npc type>/, and run /easy_npc reload skins or restart the server. In single player and LAN games the host shares its own custom skins the same way.

A player without the skin file loads it from the server when an NPC with this skin comes into view. The skin is kept in memory only and is never written to the player's disk. A local file with the same name always wins.

The custom skin screen lists the server skins next to your local ones; server skins show their name in gray.

Server skins are checked before they are shared:

  • Only PNG files up to 4 MB and 2048 ร— 2048 pixels are read.
  • Poorly compressed files are compressed again in the server memory, without changing a single pixel. The file on disk stays as it is.
  • After that a skin may have at most 768 KB to be shared, at most 512 skins and 32 MB in total.
  • Files with data after the image end, broken checksums, unknown required parts or more image data than the size allows (compression bombs) are rejected.
  • Text, color profiles, animation and other metadata are removed. The pixels stay unchanged, so skin mods that store data in transparent pixels keep working.
  • Each player can request at most 30 skins and 4 MB per minute.

Everything is set in config/easy_npc/custom_skin.cfg:

shareServerSkins=true
downloadServerSkins=true
serverSkinCompressionLevel=9
  • shareServerSkins - the server shares its custom skins
  • downloadServerSkins - the client loads missing custom skins from the server
  • serverSkinCompressionLevel - from 1 (fastest) to 9 (smallest); 0 turns the extra compression off. The compression runs once while the skins are loaded, not per player.

The same checks (without the server limits) also apply to local custom skins and URL skins.

Variants and Skin Layers ๐Ÿงฉ

The built-in skins of an NPC type are called variants. Some variants carry extra properties, for example an Illager variant with crossed arms or a horse variant with a saddle - those are part of the variant, not something you toggle separately.

Variants can also be set with commands:

/easy_npc skin set variant <NPC> <variant>

Humanoid-style NPCs additionally have a skin layer (the outer overlay of a player skin, e.g. hair and jacket):

/easy_npc skin layer <NPC>
/easy_npc skin layer <NPC> enable
/easy_npc skin layer <NPC> disable

Without enable or disable the command reports the current state.

Clearing Skin Cache ๐Ÿงผ

Skins are cached locally to boost performance. If you need to clear the cache, simply stop your Minecraft client and delete the easy_npc/cache folder in your game directory.

Troubleshooting ๐Ÿ”ง

Skins are processed on the client side, so if you're having issues, check your client-side logs for errors. Skin errors will also appear as local system messages, so keep an eye out for those.

Skin Error

The mod will retry to load failed skins after a short delay or if the client is restarted.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ