Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Animatica Refabricated Wiki › Guides › Write a simple custom animation for a texture

Write a simple custom animation for a texture

Animatica reads OptiFine-style custom animation definitions, so you can add your own to a resource pack. Each one is a small .properties file that tells the game which image to play and which texture to overwrite.

Set up the files

1. In your pack, create the folder assets/minecraft/optifine/anim.

2. Create a .properties file there, for example my_anim.properties.

3. Make an animation sheet image: the frames stacked on top of each other, each frame the size of the area you are replacing. Put it in the same folder.

Fill in the properties file

Use these keys:

`

from=./my_sheet.png

to=minecraft:textures/path/of/target.png

x=<left edge in target>

y=<top edge in target>

w=<width of the area>

h=<height of the area>

duration=<ticks each frame is shown>

`

  • from is your frame sheet.
  • to is the existing texture you want to animate.
  • x, y, w and h define the region of the target that gets overwritten.
  • duration sets how long each frame lasts. Larger values mean slower animation.

Test it

1. Enable your pack and press F3 + T.

2. Find the texture in-game.

3. If nothing moves, check that the to path is spelled exactly right, the region fits inside the target texture, and the frame size matches w and h.

Change one value at a time and reload so you can see what each one does.