Skip to content

random entity textures

Traben edited this page Mar 30, 2024 · 1 revision

🎲 Random Entity Textures

Random mobs

OptiFine comparison

  • ETF supports all OptiFine random entity texture properties such as biome, name, height etc.
  • ETF also adds extra random texture features that OptiFine does not have. Including:
    • more properties such as blocks, teams, distanceFromPlayer, creeperCharged, statusEffect and many more detailed further in etf_random_entites.properties.
    • the variation of modded entity textures.
    • the variation of certain block entity textures, such as chests and beds.

Documentation:

File structure

  • Random textures must be in one of the following folders of a resource pack.
    ETF will check from the top directory first and will only use the last directory if none of the others are used:

    • The ETF directory etf/random/entity
    • The OptiFine random directory optifine/random/entity
    • The OptiFine legacy directory optifine/mob
    • The vanilla directory minecraft/textures/entity or wherever a modded entity's texture happens to be by default.
  • The random textures must be named after this format: TextureName#.png, with # being any number that should start from 2.

  • A TextureName.properties file can be placed alongside these random textures to determine special cases for different random textures to be selected. This properties file must support the ETF/OptiFine format and if one isn't present, the game will instead pick randomly from the available random textures present. When picked randomly, the random textures must contain numbers in sequence from 2 -> however many there are. If there are any gaps, then textures after the gap will be ignored

  • The properties file functions exactly like OptiFine and if a specific entity does not match any of the conditions in the properties file it will default to the vanilla texture.

  • ETF seeds the random selection with the entities UUID, so the same entity will always have the same random texture.

Format example

This example image is a .properties file setting the following variation for a mob using "zombie.png":

(the folder shown is "assets/minecraft/optifine/random/entity/zombie/")

  • Any zombie in a desert will have a 10/17 chance of using zombie1.png

  • Any zombie not in a desert, plains, jungle or nether biome and is named John will always use zombie3.png

  • Any zombie in a taiga biome without the names above and standing at Y level 45 will use zombie1.png

  • zombie3.png has an emissive texture, zombie3_e.png, that will make its eyes glow red

Properties

  • ETF also adds the following texture properties beyond what OptiFine has:

    • teams
    • speed
    • jumpStrength
    • maxHealth
    • llamaInventory
    • hiddenGene
    • playerCreated
    • screamingGoat
    • creeperCharged
    • isAngry
    • dimension
    • distance
    • items
    • light
    • moving
    • isSpawner
    • hour
    • minute
    • second
    • monthDay
    • month
    • weekDay
    • yearDay
    • year
    • language
    • as well as expanding the regular optifine properties.
  • These and the rest of the properties added by ETF are documented with examples here

  • Certain properties in the .properties file will update the mob's texture based on the texture update speed setting. These properties are:

    • name
    • professions
    • colors
    • baby
    • health
    • nbt
    • teams
    • creeperCharged
    • isAngry
    • dimension
    • distance
    • items
    • light
    • moving
    • hour
    • minute
    • second
    • language
  • All the other conditions such as biomes & blocks will only apply the value the entity had when it first spawned. i.e. if a zombie spawns in a desert, it will have the desert texture and it will not change to the forest texture when they walk into a forest biome. Whereas a zombie with the distance property setting its variation will continuously update its texture based on the distance from the player.

Mobs with multiple textures

  • Mobs with additional textures like sheep & wool, horse & markings & armour, iron_golem & cracking_textures etc. Will, when a properties file is not present, try and match whatever variant the main texture uses. For example a sheep using sheep2.png will try to use wool2.png and if that doesn't exist it'll use the default texture

  • Entities with multiple textures like Wolves, Bees or Ghasts should be given the same amount of random variant textures for each texture variant, however this is not mandatory. Such entities will also try and use the base texture's properties if the properties for the other texture is not present. e.g. a wolf using the "wolf_angry.png" texture will try to find "wolf_angry.properties" and if it doesn't exist it will try to use "wolf.properties" to control randomization instead.


ETF entity rendering properties

ETF adds a new type of property that can be placed in an entities .properties file.

These properties do not get numbered (like biomes.1) and simply affect the rendering of all variants of the entity.

Documentation and examples can be found here.

Entity brightness override

brightness_override

vanillaBrightnessOverride=<0-15>

  • can be set as a number from 0-15
  • this overrides the brightness of the mob
  • it can be used to reduce the brightness of mobs like Blazes and Allays, or increase the brightness of others.

Entity ambient particle override

no_particles

suppressParticles=<true|false>

  • if set to true this will remove ambient particles from mobs (currently only Blazes and Glow Squids)

Entity render layer override

render layer override

entityRenderLayerOverride="translucent|translucent_cull|end_portal|outline"

  • allows you to change the rendering layer for the entity
  • in vanilla most entities will not support partial transparency, the translucent options will allow that to work
  • the end_portal and outline options are for fun simply because they work
  • Compatibility with shaders is entirely dependent on the shader

Special cases

Custom block entites
  • Chests and beds are block entities and can be customized with the same properties format as OptiFine does for other entities

  • Most block entity optimization Fabric mods such as Enhanced Block Entities, Better Beds and
    Fast Chest will disable this feature due to their mechanics changing the block entity rendering to
    block rendering

  • The name property for chests and other block entities will not work on servers, unless the server
    has a mod like Know my name!

Red Mooshroom
  • If a custom mushroom texture is placed in minecraft/textures/entity/cow/red_mushroom.png or minecraft/textures/entity/cow/brown_mushroom.png, it'll overwrite the mushrooms on the back of the respective mooshroom.
Elytra
  • Custom elytras are handled by CIT resewn and will utilise ETF emissive textures only
Armour
  • Armor textures can be customized using CIT Resewn only, as it allows greater customization and makes more sense as the armor is an item

  • ETF will provide emissive support for CIT customized armor textures