<commit_before>Structuring Your Mod
====================

We'll look at how to organize your mod into different files and what those files should do.

Packaging
---------

Pick a unique package name. If you own a URL associated with your project, you can use it as your top level package. For example if you own "example.com", you may use `com.example` as your top level package.

!!! important

    If you do not own a domain, do not use it for your top level package. It is perfectly acceptable to start your package with anything, such as your name/nickname, or the name of the mod.

After the top level package (if you have one) you append a unique name for your mod, such as `examplemod`. In our case it will end up as `com.example.examplemod`.

The `mods.toml` file
-------------------

This file defines the metadata of your mod. Its information may be viewed by users from the main screen of the game through the Mods button. A single info file can describe several mods.

The `mods.toml` file is formatted as [TOML](https://github.com/toml-lang/toml), the example mods.toml file in the MDK provides comments explaining the contents of the file. It should be stored as `src/main/resources/META-INF/mods.toml`. A basic `mods.toml`, describing one mod, may look like this:
```toml
    # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
    modLoader="javafml"
    # A version range to match for said mod loader - for regular FML @Mod it will be the forge version
    # Forge for 1.14.4 is version 28
    loaderVersion="[28,)]"
    # A URL to refer people to when problems occur with this mod
    issueTrackerURL="github.com/MinecraftForge/MinecraftForge/issues"
    # If the mods defined in this file should show as seperate resource packs
    showAsResourcePack=false

    [[mods]]
      modId="examplemod"
      version="1.0.0.0"
      displayName="Example Mod"
      updateJSONURL="minecraftforge.net/versions.json"<commit_msg>Fixed typo in example mods.toml (#263)<commit_after>Structuring Your Mod
====================

We'll look at how to organize your mod into different files and what those files should do.

Packaging
---------

Pick a unique package name. If you own a URL associated with your project, you can use it as your top level package. For example if you own "example.com", you may use `com.example` as your top level package.

!!! important

    If you do not own a domain, do not use it for your top level package. It is perfectly acceptable to start your package with anything, such as your name/nickname, or the name of the mod.

After the top level package (if you have one) you append a unique name for your mod, such as `examplemod`. In our case it will end up as `com.example.examplemod`.

The `mods.toml` file
-------------------

This file defines the metadata of your mod. Its information may be viewed by users from the main screen of the game through the Mods button. A single info file can describe several mods.

The `mods.toml` file is formatted as [TOML](https://github.com/toml-lang/toml), the example mods.toml file in the MDK provides comments explaining the contents of the file. It should be stored as `src/main/resources/META-INF/mods.toml`. A basic `mods.toml`, describing one mod, may look like this:
```toml
    # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
    modLoader="javafml"
    # A version range to match for said mod loader - for regular FML @Mod it will be the forge version
    # Forge for 1.14.4 is version 28
    loaderVersion="[28,)"
    # A URL to refer people to when problems occur with this mod
    issueTrackerURL="github.com/MinecraftForge/MinecraftForge/issues"
    # If the mods defined in this file should show as seperate resource packs
    showAsResourcePack=false

    [[mods]]
      modId="examplemod"
      version="1.0.0.0"
      displayName="Example Mod"
      updateJSONURL="minecraftforge.net/versions.json"
{'fraction_non_alphanumeric': 0.08928571428571429, 'fraction_numerical': 0.006790744466800805, 'mean_word_length': 3.4535274356103023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7639887', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1092, 'n_words': 562}