Skip to content

Adding Variants (Variant Loader)

Aram edited this page Nov 22, 2024 · 5 revisions

This variant loader has been designed with Geckolib in mind; therefore, using Geckolib is recommended.


Adding Variants

Overview

Steps

  1. Register Your Entity:

    • Follow the instructions outlined in the Getting Started section to register your entity with the Variant Loader.
  2. Create Your Entity:

    • Follow the instructions outlined in the Adding Entities section to create your entity.
    • Completing these steps is crucial for ensuring that your entity exists and is recognized by the Variant Loader.

Getting Started

When adding variants to the Variant Loader, it is essential to create JSON configuration files and place them in the data/<modid>/variant/entity/ folder of your mod. This allows users to modify the variants using Data and Resource Packs.

  • Note: If you are familiar with resource management in Minecraft, you may modify the resource paths to fit your preferences. Just ensure that your modifications are consistent and correctly referenced in your code.

Creating JSON Configuration Files

Users can create multiple JSON configuration files. Each JSON handles the registration of 1 variant and its Custom Parameters

Example Configuration

Here is an example of how to structure your JSON configuration file:

One Variant per file

{
  "variantOne": [
    {
      "possibleParameter": "possibleValue"
    }
  ]
}

Key Points

  • The structure of your JSON files must adhere to proper JSON formatting to avoid errors during loading.
  • Organizing your variants logically will help in managing them efficiently, especially as the number of entities grows.

For more detailed information on what to put inside the JSON configuration files, refer to Custom Parameters

For further information and advanced customization options, refer to the official Discord community where you can seek help, share experiences, and learn from other developers. You may also refer to our API Documentation.