Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Cc Complementary Core Wiki › Guides › Generate Recipes and Loot Tables Using CC Helpers

Generate Recipes and Loot Tables Using CC Helpers

Data Generation Helpers

CC provides helper classes for generating recipes, loot tables, blockstates, and item models programmatically. This reduces manual JSON writing and keeps your data files consistent.

Workflow

1. Create a data generator class in your mod that extends CC's data provider base.

2. Use recipe helpers to define shaped or shapeless recipes. Specify ingredients, results, and any special conditions without writing JSON directly.

3. Build loot tables using CC's loot table builder. Define pool entries, conditions, and functions through code instead of nested JSON structures.

4. Generate blockstates and models for your blocks using CC's model helpers, which handle rotation, variants, and texture assignment.

5. Run data generation through your build process. CC outputs valid JSON files to your mod's data folder.

6. Verify output by checking generated files match Minecraft's format and contain correct values.

Using helpers makes data generation faster, less error-prone, and easier to maintain. Changes to recipes or loot can be made in code and regenerated instantly.