# nerdypuzzle/mcreator-player-animator architecture

> Architecture diagram of the GitHub repository nerdypuzzle/mcreator-player-animator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nerdypuzzle/mcreator-player-animator
- Repository: https://github.com/nerdypuzzle/mcreator-player-animator

## Overview

Player Animator is an MCreator plugin for managing player animations, selecting them in Blockly, previewing animation JSON in a workspace panel, and providing generated procedures and rendering/network templates. The runtime workflow begins when MCreator loads the plugin: it registers a JavaScript bridge and adds the animation panel; Blockly selection uses that bridge to choose an animation. The panel also imports and parses animation files and previews bone transforms. No README was provided, and the resource-template wiring is not shown in the excerpts, so those capabilities are represented without inferred flow edges.

Main entry points: [`src/main/java/net/nerdypuzzle/playeranimator/Launcher.java`](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/Launcher.java) (Plugin launcher), [`src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java) (Animation panel), [`src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java`](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java) (JavaScript bridge), [`src/main/resources/blockly/js/field_animation_selector.js`](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/blockly/js/field_animation_selector.js) (Animation selector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin lifecycle"]
  node_launcher["Plugin launcher<br/>[Launcher.java]"]
  node_bridge["JavaScript bridge"]
end

subgraph group_workspace["Animation workspace"]
  node_workspace_panel["Animation panel"]
  node_animation_files["Animation JSON"]
  node_preview["Animation preview"]
end

subgraph group_blockly["Blockly integration"]
  node_selector["Animation selector"]
end

subgraph group_generation["Generated mod features"]
  node_procedures["Animation procedures<br/>[procedures]"]
  node_packet_template["Animation packet"]
  node_animation_api["Animation API"]
  node_player_mixins["Player rendering mixins"]
  node_firstperson_mixins["First-person rendering<br/>[firstperson]"]
  node_procedures_261["Animation procedures<br/>[procedures]"]
  node_packet_template_261["Animation packet"]
  node_render_templates_261["Rendering templates<br/>[templates]"]
end

node_mcreator(("MCreator"))

node_mcreator -->|"loads plugin"| node_launcher
node_launcher -->|"registers bridge"| node_bridge
node_launcher -->|"adds tab"| node_workspace_panel
node_workspace_panel -->|"imports and parses"| node_animation_files
node_workspace_panel -->|"updates transforms"| node_preview
node_selector -->|"opens selector"| node_bridge
node_bridge -->|"opens dialog"| node_mcreator

click node_launcher "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/Launcher.java"
click node_bridge "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java"
click node_workspace_panel "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java"
click node_animation_files "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java"
click node_preview "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java"
click node_selector "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/blockly/js/field_animation_selector.js"
click node_procedures "https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-1.21.1/procedures"
click node_packet_template "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/animation_play_packet.java.ftl"
click node_animation_api "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/player_animation_api.java.ftl"
click node_player_mixins "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/player_model_mixin.java.ftl"
click node_firstperson_mixins "https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-1.21.1/templates/firstperson"
click node_procedures_261 "https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-26.1.2/procedures"
click node_packet_template_261 "https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-26.1.2/templates/animation_play_packet.java.ftl"
click node_render_templates_261 "https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-26.1.2/templates"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_bridge toneBlue
class node_workspace_panel,node_animation_files,node_preview toneAmber
class node_selector toneMint
class node_procedures,node_packet_template,node_animation_api,node_player_mixins,node_firstperson_mixins,node_procedures_261,node_packet_template_261,node_render_templates_261 toneRose
class node_mcreator toneIndigo
```

## Components

### Plugin lifecycle

- [Plugin launcher](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/Launcher.java): `src/main/java/net/nerdypuzzle/playeranimator/Launcher.java`
- [JavaScript bridge](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java): `src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java`

### Animation workspace

- [Animation panel](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java): `src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`
- [Animation JSON](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java): `src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`
- [Animation preview](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java): `src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`

### Blockly integration

- [Animation selector](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/blockly/js/field_animation_selector.js): `src/main/resources/blockly/js/field_animation_selector.js`

### Generated mod features

- [Animation procedures](https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-1.21.1/procedures): `src/main/resources/neoforge-1.21.1/procedures`
- [Animation packet](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/animation_play_packet.java.ftl): `src/main/resources/neoforge-1.21.1/templates/animation_play_packet.java.ftl`
- [Animation API](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/player_animation_api.java.ftl): `src/main/resources/neoforge-1.21.1/templates/player_animation_api.java.ftl`
- [Player rendering mixins](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-1.21.1/templates/player_model_mixin.java.ftl): `src/main/resources/neoforge-1.21.1/templates/player_model_mixin.java.ftl`
- [First-person rendering](https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-1.21.1/templates/firstperson): `src/main/resources/neoforge-1.21.1/templates/firstperson`
- [Animation procedures](https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-26.1.2/procedures): `src/main/resources/neoforge-26.1.2/procedures`
- [Animation packet](https://github.com/nerdypuzzle/mcreator-player-animator/blob/main/src/main/resources/neoforge-26.1.2/templates/animation_play_packet.java.ftl): `src/main/resources/neoforge-26.1.2/templates/animation_play_packet.java.ftl`
- [Rendering templates](https://github.com/nerdypuzzle/mcreator-player-animator/tree/main/src/main/resources/neoforge-26.1.2/templates): `src/main/resources/neoforge-26.1.2/templates`

### Other components

- **MCreator**

## Connections

- MCreator → Plugin launcher: loads plugin (evidence: `src/main/java/net/nerdypuzzle/playeranimator/Launcher.java`)
- Plugin launcher → JavaScript bridge: registers bridge (evidence: `src/main/java/net/nerdypuzzle/playeranimator/Launcher.java`)
- Plugin launcher → Animation panel: adds tab (evidence: `src/main/java/net/nerdypuzzle/playeranimator/Launcher.java`)
- Animation panel → Animation JSON: imports and parses (evidence: `src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`)
- Animation panel → Animation preview: updates transforms (evidence: `src/main/java/net/nerdypuzzle/playeranimator/parts/WorkspacePanelPlayerAnimations.java`)
- Animation selector → JavaScript bridge: opens selector (evidence: `src/main/resources/blockly/js/field_animation_selector.js`)
- JavaScript bridge → MCreator: opens dialog (evidence: `src/main/java/net/nerdypuzzle/playeranimator/parts/PluginJavascriptBridge.java`)
