• IceSunCN
  • BBS

Navigation

  • Home
  • Style Guide
  • Getting Started
    • Home
    • Structuring Your Mod
    • Forge Update Checker
    • Dependency Management
    • Debug Profiler
  • Concepts
    • Sides
    • Resources
    • Registries
    • The Fingerprint Violation Event
    • Internationalization and localization
  • Blocks
    • Home
    • Intro to Blockstates
    • Interaction
  • Animation API
    • Intro to the Animation API
      • Filesystem Structure Conventions
    • Armatures
    • Animation State Machines
    • Using the API
  • Tile Entities
    • Home
    • Special Renderer
  • Items
    • Home
    • Loot Tables
  • Models
    • Intro to Models
    • Model Files
    • Blockstates
      • Intro to Blockstate JSONs
      • Forge Blockstate JSON
    • Connecting Blocks and Items to Models
    • Coloring Textures
    • Item Property Overrides
    • Advanced Models
      • Intro to Advanced Models
      • IModel
      • IModelState and IModelPart
      • IBakedModel
      • Extended Blockstates
      • Perspective
      • ItemOverrideList
      • ICustomModelLoader
  • Rendering
    • TileEntityItemStackRenderer
  • Events
    • Basic Usage
  • Networking
    • Home
    • Overview
    • SimpleImpl
    • Entities
  • Data Storage
    • Capabilities
    • World Saved Data
    • Extended Entity Properties
    • Config Annotations
  • Utilities
    • Recipes
    • OreDictionary
    • PermissionAPI
  • Effects
    • Sounds
  • Conventions
    • Versioning
    • Locations
    • Loading Stages
  • Contributing to Forge
    • Getting Started
    • PR Guidelines

Intro to the Animation API

The Forge Animation API lets you animate JSON (and B3D) models. Before you start reading this, you should know how vanilla JSON models are created, and should have read the documentation on blockstates.

Note

Although you can use B3D models with the Animation API, most of this documentation will assume you are using JSON files. (TODO) See the page on using B3D models for more information

The Animation API is made up of two main components: armature files and animation state machine (ASM) files. Armature files define joints and clips for JSON files. Joints are names for cubes in the model file with weights (see the page on armatures for more info), while clips are a set of transformations to apply to joints over time (think of a clip from a movie for example). ASM files define the various states an animation can be in, as well as what transitions exist between those states. They also define the parameters for an animation (functions which return a floating point number), which are generally used as inputs to clips, but can also trigger events. Events are essentially a way to receive in-code notifications when the animation reaches a certain point or to trigger transitions.

Filesystem Structure Conventions

ASM Files are normally stored in the asms/block for blocks or asms/item for items and so on. You specify where to load them from, so their location is really up to you.

Armature files must be stored in the armatures folder. They are looked up by taking the path to your model file, removing models/ and taking whats left and prepending armatures/, so a model in models/block/test.json becomes armatures/block/test.json.

Built with MkDocs using a custom theme. Hosted by Read the Docs.
Enable Dark Theme