The Simple API gets an animated entity, item or block entity working with one renderer class. You don't write an animator, an animation controller or a dispatcher.
1. Put your files in the expected places
The Simple API finds your files by name. For AzSimple.entity("mymod", "monster") it uses:
assets/mymod/geo/entity/monster.geo.jsonassets/mymod/textures/entity/monster.pngassets/mymod/animations/entity/monster.animation.json
Items use the item folder and block entities the block folder instead of entity.
2. Make a renderer
public class MonsterRenderer extends AzSimpleEntityRenderer<Monster> {public MonsterRenderer(EntityRendererProvider.Context context) {super(context, AzSimple.entity("mymod", "monster").idle("idle").walk("walk"));}}
The monster now loops idle while standing still and walk while moving.
Register it like any other entity renderer:
@Overridepublic void onInitializeClient() {EntityRendererRegistry.register(YourEntities.MONSTER, MonsterRenderer::new);}
3. Play animations
Call these from your entity's server-side code, for example where it attacks:
AzSimple.play(this, "attack"); // plays once, then goes back to idle/walkAzSimple.loop(this, "dance"); // loops until stopped or replacedAzSimple.stop(this); // back to idle/walk
Any animation in your animation file can be played by name. Everyone near the entity sees it, and idle and walk wait until it is done. Animations are only visual: deal damage in your own code as usual.
That's all you need for an animated entity.
Items
public class BlasterRenderer extends AzSimpleItemRenderer {public BlasterRenderer() {super(AzSimple.item("mymod", "blaster").idle("idle"));}}
Play animations with the stack and the player holding it, from server-side code such as use:
AzSimple.play(stack, player, "fire");
Items need two registrations: the renderer on the client, and the item itself during common setup so each stack can remember its own animation.
// In onInitialize()AzIdentityRegistry.register(YourItems.BLASTER);// In onInitializeClient()AzItemRendererRegistry.register(BlasterRenderer::new, YourItems.BLASTER);
Block entities
public class MachineRenderer extends AzSimpleBlockRenderer<MachineBlockEntity> {public MachineRenderer() {super(AzSimple.block("mymod", "machine").idle("idle"));}}
AzSimple.play(blockEntity, "activate");
Register it with context -> new MachineRenderer() wherever you register block entity renderers.
Next steps
The advanced page covers everything else the Simple API can do: custom asset paths, more automatic animations (swimming, running, death), animation priorities, layers for things like aiming or recoil, procedural bone tweaks, and mixing the Simple API with the full API.