Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Arrp Library Wiki › Guides › Generating Blockstates and Models Without JSON Files

Generating Blockstates and Models Without JSON Files

Emitting Models from Code

ARRP can produce blockstate and model JSON at runtime, so you never hand-write model files. You build the model definition in code and let ARRP serialize it into the generated pack.

1. Decide the model type: a simple cube-all model, a cube with per-face textures, or a parent model that inherits from a vanilla template.

2. In your generator, create the model using ARRP's model builder — set the parent (for example a vanilla cube template) and assign textures by slot name (all, side, top, etc.).

3. Write the model to the models/block or models/item path using an identifier that matches your block or item.

4. Build the blockstate separately: map each block state (or the default variant) to the model identifier you just created.

5. Output both into the pack.

Keeping Textures Valid

ARRP generates JSON, not images — your textures must already exist as real files in your mod's assets or in a resource pack. Reference them by their normal texture identifier. If a texture is missing, the model will render with the missing-texture placeholder.

Reload and Check

Run a resource reload and place the block or hold the item. If it shows the purple/black missing model, verify the blockstate's model id exactly matches the model file path you wrote, and that the parent template exists.