FFEntityPainting

Datapacks

An entity type tag and a folder of exclusion rules decide which mobs can't be painted, and functions can set up paint and team layers with the /entitypaint commands. Add tag entries with "replace": false to extend the tag, and use /reload after changing a datapack. Resource packs can also fix modded mobs: see Resource pack surface data below.

Tag Type What it does Ships with
ffentitypainting:unpaintable entity type Mobs that can never be painted: they show no paint, and players can't paint them or open their layer manager Empty

The file lives at data/ffentitypainting/tags/entity_type/unpaintable.json. Every mob is paintable unless it's listed here, vanilla or modded, including mobs animated with GeckoLib. Mods can ship the same file in their jar to opt their own mobs out.

Example

Keep players and a modded boss from being painted:

{
  "replace": false,
  "values": [
    "minecraft:player",
    { "id": "somemod:ancient_guardian", "required": false }
  ]
}

Save it as data/ffentitypainting/tags/entity_type/unpaintable.json in your datapack. "required": false keeps the tag loading when that mod isn't installed.

Exclusion rules (0.9.8)

For mobs the tag can't pick out, put a rule file at data/<namespace>/ffentitypainting/exclusions/<name>.json. A file holds one rule, or {"rules": [ ... ]}. A rule excludes a mob when every condition it lists holds, and needs at least one:

Field Type Matches
entity_types list of text Entity type IDs, or #tag IDs. The mob matches when its type is any of them
baby true or false Babies (true) or adults (false)
custom_name text The mob's custom name, compared exactly and ignoring case
dimensions list of text Dimension IDs. The mob matches when it is in any of them
{
  "rules": [
    { "entity_types": ["somemod:training_dummy"], "custom_name": "Statue" },
    { "entity_types": ["minecraft:villager"], "baby": true },
    { "dimensions": ["minecraft:the_end"] }
  ]
}

The first rule keeps a dummy named "Statue" unpaintable, the second keeps baby villagers unpaintable and the third keeps everything in the End unpaintable. A rule with no conditions, an unknown field, a wrong type or a malformed ID is skipped and logged on the server. At most 256 rules are used (64 entries per list). Only conditions both the server and the player's game can read are offered; the server sends its rules to each player when they join and after every /reload, and a player's game only ever uses the server's.

A mob excluded this way behaves exactly like one in the tag: it shows no paint, players can't paint it or open its layer manager, and its paint is kept until the rule stops matching. Code can add rules too with EntityPaintingAPI.excludeEntities (see the modding API).

Resource pack surface data (0.9.8)

Resource packs (not datapacks) can tell FFEntityPainting how to treat textures and models without any code, for example to fix a modded mob. Put a file at assets/<namespace>/ffentitypainting/surfaces/<name>.json; every such file in every enabled pack is read when resources load, lower packs first, so a higher pack wins for the same texture. A file can hold:

Field What it does
aliases An object from a texture to the canonical texture it is painted as, so paint stays put when a mob swaps texture with its state (angry, sleeping, tamed). Both sides are full texture paths
groups A list of { "canonical": id, "textures": [id, ...] }, for several textures that share one
exclude_models Model class names that are left unpainted: use it when a modded model captures the wrong spot. A name ending in * matches every class starting with it, and a class also matches through its superclasses
{
  "aliases": {
    "somemod:textures/entity/wolfish_angry.png": "somemod:textures/entity/wolfish.png"
  },
  "groups": [
    {
      "canonical": "somemod:textures/entity/golem.png",
      "textures": ["somemod:textures/entity/golem_cracked.png", "somemod:textures/entity/golem_mossy.png"]
    }
  ],
  "exclude_models": ["com.somemod.client.model.GhostModel", "com.somemod.client.weird.*"]
}

Only alias textures with the same layout, because paint is placed by texture position. A pack alias wins over one a mod registers in code. Malformed entries are skipped and logged. Reloading resources (F3 + T) applies changes; paint already on a mob keeps working because paint is stored under the canonical texture.

Functions and commands

Functions can use the overview page's /entitypaint commands (functions have permission level 2), including team layers: combine layer add and layer access with vanilla teams and tags. For example, a capture-the-flag map can give each team's banner mob a layer only that team sees, and move a captain tag between players to decide who may paint it. Players see tag and team changes within about a second.

Notes