Skip to content

1.12 Configuration

Mikael E. Wikner edited this page Feb 16, 2020 · 3 revisions

Most content in tetra can be configured by placing json files in the config folder, the following can be configured:

  • Modules: Modules make up the modular items, stats, effects and rendering can be changed, existing variants of a module can be removed or new ones can be added.
  • Schemas: Schemas define how and where a module or an improvement can be added. Tools and materials required for a specific module or improvement can be configured, existing outcomes can be changed or removed and new outcomes or entire schemas can be added.
  • Replacements: Tetra only adds a few crafting recipes on its own and instead relies on converting vanilla items (and items from other mods) into modular items the first time a module or improvement is added. Replacements define how a regular item should be converted into a modular item. See ReplacementDefinition.java for more details.
  • Geodes: Geodes randomly drop when players break stone blocks deep underground. On which y-levels, how often and which blocks that drop geodes can be configured, the metadata of the dropped geode can also be changed. It's also possible to configure the loot table used when breaking a geode by changing the loot table the workbench action.
  • Workbench actions: A workbench action is what the player uses when repairing a modular item or when breaking a geode. The repair action is dynamic but static actions such as breaking a geode can be configured and similar types of actions can also be added for geodes or any other itemstack.

The default configurations are available over here https://github.com/mickelus/tetra/tree/schema-overhaul/src/main/resources/data/tetra and all files in there can be overridden by placing a file at a corresponding location within the config folder. E.g. to replace the configuration for heavy blade you'd have to create a file at config/tetra/modules/sword/heavy_blade.json in the minecraft folder.

For now it's only possible to replace config files, but the plan is to make it possible to add new content configuration files in the future to make configuration a bit more manageable.

When adding new content (e.g. a copper blade or a schema for crafting better hilts) localization and textures have to be added, this can be done by creating a new resource pack with a lang file and textures in the correct folder structure. Have a look at en_us.lang and /assets/tetra/textures for how it has to be set up.

Here is a basic config setup example: https://github.com/mickelus/tetra-config-example