Skip to content

Random Entity Textures

jack edited this page Sep 25, 2026 · 1 revision

Random entity textures

Salamander loads numbered entity texture variants and ETF/OptiFine Random Entities .properties rules. This works with native models and CEM models, without Angelica or a server component.

Enable a compatible resource pack normally. For example, Cozy Critters 1 supplies randomized farm animals and CEM models. Its original cozy-critters-1-19-4.zip works without repacking. Packs that replace the same models or textures still follow resource-pack priority; their contents are not automatically merged.

Configuration

textures.randomEntityTextures in config/salamander/salamander.cfg defaults to true. Reload resources after changing it. This setting is independent of cem.enabled: disabling CEM restores native geometry while keeping texture variation enabled.

Texture layout

For a base texture such as assets/minecraft/textures/entity/cow/cow.png, variants can be placed in:

  1. assets/minecraft/etf/random/entity/cow/cow2.png
  2. assets/minecraft/optifine/random/entity/cow/cow2.png
  3. assets/minecraft/optifine/mob/cow/cow2.png
  4. assets/minecraft/mcpatcher/mob/cow/cow2.png
  5. assets/minecraft/textures/entity/cow/cow2.png

Higher-priority packs win. Within a pack, the directory order above breaks ties. Mod texture namespaces are preserved. Known modern texture names for existing vanilla entities are accepted too.

Without a .properties file, numbering must be consecutive starting at 2. Selection includes the original texture as index 1 and stops at the first missing number. Names already ending in a digit use a dot separator, for example example_2.3.png.

With a .properties file, numbered rules are checked in order. The first matching rule wins. textures.N and the older skins.N names are accepted, along with ranges and weights. Rules can select sparse texture numbers. Index 1, unmatched rules, and missing selected images fall back to the base texture.

textures.1=2
name.1=ipattern:Speckles*

textures.2=3 4
weights.2=1 3
baby.2=true

textures.3=1-4

The file belongs beside the variants, named cow.properties in this example. Incorrect rule files log a diagnostic and retain the original texture.

Selection behavior

An entity's UUID provides its stable random seed. Block entities use their block position. Initial biome, height, and the blocks at and beneath the entity are retained when first observed; walking into another biome does not change these conditions. Resource reloads and world changes clear these observations.

Name, age, health and other changing conditions are refreshed each client tick. Texture selections are shared across repeated render passes within the tick. Only information available on the client can affect a rule.

Texture layers without their own rules follow the main texture's selected number, including wool and eye textures. Missing layer variants use the native layer texture. State textures such as angry wolves, attacking ghasts and nectar-carrying bees can inherit their base texture's properties. Explicit layer rules take precedence. CEM parts with their own textures can use independent rules as well.

Existing CEM emissive rendering looks up the mask belonging to the selected texture. This milestone does not add a general emissive render pass to every native renderer.

Supported conditions

The standard conditions are biomes, heights, minHeight, maxHeight, name, professions, colors/collarColors, baby, health (including percentages), moonPhase, dayTime, weather, sizes, nbt, and blocks.

Additional ETF conditions mapped to available 1.7.10 data are:

  • teams, dimension, distance/distanceFromPlayer, light, and moving.
  • speed, maxHealth, horse jumpStrength, and iron-golem playerCreated.
  • creeperCharged and angry/isAngry for wolves, endermen and blazes.
  • items, including item IDs and any, none, holding, and wearing.
  • language, hour, minute, second, monthDay, month, weekDay, yearDay, and year.

Modern biome names are mapped where a corresponding legacy biome exists. Dimensions use overworld, the_nether, the_end, or a numeric ID for other dimensions. Equipment and NBT checks use the legacy item IDs and NBT format. Modern villager levels, block-state properties, and other absent mechanics are not invented.

This is partial ETF compatibility. Additional predicates, ETF player-skin features, general emissive rendering, render-layer overrides, particle overrides and brightness overrides remain outside this milestone. Player skin/cape randomization, stitched atlases and dynamically composed horse textures are not handled by this texture resolver. See Player models for the separate player-pack support.

Validation

Java 8 runtime checks use isolated Xvfb clients, both standalone and with Et Futurum Requiem, Angelica and Complementary Reimagined shaders. They verify actual texture bindings, live rule changes, stable initial conditions, mutable entity IDs, nested render scopes, body/wool matching, chests, EFR bee state textures, independent texture/CEM toggles and resource reloads. The original Cozy Critters pack is also checked visually.

The automated suite checks resource priority, directory layouts, sparse variants, weights, aliases, state/layer inheritance, missing assets, invalid rules and the original Cozy Critters rule files. See Development for running the external-pack tests.

Format references: OptiFine Random Entities and ETF random entity textures.

Clone this wiki locally