Custom Animations#

Custom Animations allows all textures to be animated, like GUIs and entities.

_images/icon6.png

Animation is in a "sheet"#

In Minecraft i.5, Mojang added the power to breathing any block or particular texture (originally a feature provided by MCPatcher). However, in that location is yet no way to animate other textures like mob skins or GUIs. OptiFine fills the gap enabling whatsoever rectangular area of any not-block or item texture to be animated.

This includes even textures specific to other OptiFine features such every bit random mob skins or skyboxes.

For block and detail textures, including CTM and CIT replacements, continue using Mojang'due south mcmeta method instead.

To build an blitheness, first cull a texture and determine the 10 and Y coordinates, and width and height of the area to animate. Create the animation every bit a vertical strip of frames.

The width should be the same equally the width of the expanse to breathing. The acme should be a multiple of the blitheness area meridian.

Multiple, not-overlapping parts of the aforementioned texture can be animated by using the same to value with different from , x , y , w , and h values. They can even accept independent timing and frame society information.

For maximum compatibility, information technology is best to make ten , y , w , and h multiples of xvi (xvi, 32, 64, 128, etc.).

Properties#

Location

/assets/minecraft/optifine/anim/ANY NAME.properties

Note

duration , interpolate , skip , tile , duration are optional, rest are required

Fundamental

Values

Meaning

from

Values: String, path to texture

Required: ✅ Yes

Path to animation to display

to

Values: Cord, path to texture

Required: ✅ Yes

Path to static texture to replace

10

Values: Positive integer

Required: ✅ Yeah

X coordinate of surface area to animate

y

Values: Positive integer

Required: ✅ Yes

Y coordinate of area to animate

w

Values: Positive integer

Required: ✅ Yes

Width of individual blitheness frame

h

Values: Positive integer

Required: ✅ Yeah

Height of individual animation frame

duration

Values: Positive integer

Required: ❌ No

Duration of each frame, in ticks

interpolate

Values: Boolean

Required: ❌ No

Interpolate between each frame

skip

Values: Positive integer

Required: ❌ No

Frame number to skip during animation

tile.<N>

Values: Positive integer, N is positive integer

Required: ❌ No

Tile to brandish at N-th tick

duration.<N>

Values: Positive integer, N is positive integer

Required: ❌ No

Duration in ticks to display tile N for

Example#

                                from                =                ./glow_squid_glow.png                                to                =                textures/entity/squid/glow_squid.png                                x                =                0                                y                =                0                                w                =                64                                h                =                32                                elapsing                =                1                                interpolate                =                true                                skip                =                2                              

Annotation

See the Properties Files document for how to specify paths to texture files

This creates an interpolating animation that plays each frame in social club from summit to bottom once for i tick (one/20th 2nd) each and so loops infinitely.

Frame gild and timing#

Each custom animation may likewise specify its animation speed and frame order. In the backdrop file, add a series of entries:

X starts at 0 and represents the order frames should be displayed in. Y is the tile number in the animation PNG file, the offset tile being 0, the second 1, etc. Z is the duration that frame should be displayed, in game ticks (1 tick = i/xx 2nd).

If omitted, duration is assumed to be the default frame duration or ane if not configured.

For example, suppose the animation file is 16x48 (3 frames). To make information technology run on a 5-frame cycle with a suspension in the eye, the properties file might wait similar this:

                                tile.0                =                0                                tile.1                =                i                                tile.2                =                two                                duration.2                =                5                                tile.3                =                i                                tile.4                =                0                              

The animation happens in this order:

  1. Frame 0: Display animation tile 0 for i tick (default duration).

  2. Frame 1: Display animation tile i for 1 tick (default duration).

  3. Frame 2: Display blitheness tile two for 5 ticks (duration=5).

  4. Frame 3: Display animation tile one for 1 tick (default elapsing).

  5. Frame iv: Display animation tile 0 for 1 tick (default duration).

  6. Go back to frame 0.

Total: 5 frames over nine ticks.


🆚️ This documentation assumes the latest OptiFine version. Notes may be made for legacy versions (one.8), simply there is no guarantee.

©️ This file is offered without whatever copyright restrictions. Please copy and change information technology to suit your needs.