cpw.mods.fml.common

## Annotation Type Mod

-     @Retention(value=RUNTIME)
      @Target(value=TYPE)
      public @interface Mod

  This defines a Mod to FML. Any class found with this annotation applied will be loaded as a Mod. The instance that is loaded will represent the mod to other Mods in the system. It will be sent various subclasses of `FMLEvent` at pre-defined times during the loading of the game, based on where you have applied the `Mod.EventHandler` annotation.

  This is a simple example of a Mod. It has the modId of "MyModId", the name of "My example mod", it is version 1.0, and depends on FML being loaded.

      package mymod;
       // Declare that this is a mod with modId "MyModId", name "My example mod", version "1.0" and dependency on FML.
       {@literal @}Mod(modId="MyModId",name="My example mod",version="1.0",dependencies="required-after:FML")
       public class MyMod {
            // Populate this field with the instance of the mod created by FML
            {@literal @}Instance("MyModId")
            public MyMod instance;

            // Mark this method for receiving an {@link FMLEvent} (in this case, it's the {@link FMLPreInitializationEvent})
            {@literal @}EventHandler public void preInit(FMLPreInitializationEvent event)
            {
                // Do stuff in pre-init phase (read config, create blocks and items, register them)
            }
       }

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `java.lang.String` | `modid` The unique mod identifier for this mod

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `java.lang.String` | `acceptableRemoteVersions` A replacement for the no-longer-existing "versionRange" of NetworkMod.
    `java.lang.String` | `acceptableSaveVersions` A version range specifying compatible save version information.
    `java.lang.String` | `acceptedMinecraftVersions` The acceptable range of minecraft versions that this mod will load and run in The default ("empty string") indicates that only the current minecraft version is acceptable.
    `java.lang.String` | `asmHookClass` Deprecated.
    `java.lang.String` | `bukkitPlugin` An optional bukkit plugin that will be injected into the bukkit plugin framework if this mod is loaded into the FML framework and the bukkit coremod is present.
    `boolean` | `canBeDeactivated` If your mod doesn't have a runtime persistent effect on the state of the game, and can be disabled without side effects (minimap mods, graphical tweak mods) then you can set true here and receive the FMLDeactivationEvent to perform deactivation tasks.
    `java.lang.String` | `certificateFingerprint` Specifying this field allows for a mod to expect a signed jar with a fingerprint matching this value.
    `Mod.CustomProperty[]` | `customProperties` A list of custom properties for this mod.
    `java.lang.String` | `dependencies` A simple dependency string for this mod (see modloader's "priorities" string specification)
    `java.lang.String` | `guiFactory` An optional GUI factory for this mod.
    `java.lang.String` | `modLanguage` The language the mod is authored in.
    `java.lang.String` | `name` A user friendly name for the mod
    `boolean` | `useMetadata` Whether to use the mcmod.info metadata by default for this mod.
    `java.lang.String` | `version` A version string for this mod

- - ### Element Detail

    - #### modid

          public abstract java.lang.String modid

      The unique mod identifier for this mod

    - #### name

          public abstract java.lang.String name

      A user friendly name for the mod
      Default:
        ""

    - #### version

          public abstract java.lang.String version

      A version string for this mod
      Default:
        ""

    - #### dependencies

          public abstract java.lang.String dependencies

      A simple dependency string for this mod (see modloader's "priorities" string specification)
      Default:
        ""

    - #### useMetadata

          public abstract boolean useMetadata

      Whether to use the mcmod.info metadata by default for this mod. If true, settings in the mcmod.info file will override settings in these annotations.
      Default:
        false

    - #### acceptedMinecraftVersions

          public abstract java.lang.String acceptedMinecraftVersions

      The acceptable range of minecraft versions that this mod will load and run in The default ("empty string") indicates that only the current minecraft version is acceptable. FML will refuse to run with an error if the minecraft version is not in this range across all mods.
      Returns:
        A version range as specified by the maven version range specification or the empty string
      Default:
        ""

    - #### acceptableRemoteVersions

          public abstract java.lang.String acceptableRemoteVersions

      A replacement for the no-longer-existing "versionRange" of NetworkMod. Specify a remote version range that this mod will accept as valid. Defaults to nothing, which is interpreted as "only this version". Another special value is '*' which means accept all versions. This is ignored if there is a `NetworkCheckHandler` annotation on a method in this class.
      Returns:
        A version range as specified by the maven version range specification or the empty string
      Default:
        ""

    - #### acceptableSaveVersions

          public abstract java.lang.String acceptableSaveVersions

      A version range specifying compatible save version information. If your mod follows good version numbering practice Like this (http://semver.org/) then this should be sufficient. Advanced users can specify a `SaveInspectionHandler` instead.
      Returns:
        A version range as specified by the maven version range specification or the empty string
      Default:
        ""

    - #### bukkitPlugin

          public abstract java.lang.String bukkitPlugin

      An optional bukkit plugin that will be injected into the bukkit plugin framework if this mod is loaded into the FML framework and the bukkit coremod is present. Instances of the bukkit plugin can be obtained via the `BukkitPluginRef` annotation on fields. This may be implemented by a bukkit integration. It is not provided with vanilla FML or MinecraftForge.
      Returns:
        The name of the plugin to load for this mod
      Default:
        ""

    - #### certificateFingerprint

          public abstract java.lang.String certificateFingerprint

      Specifying this field allows for a mod to expect a signed jar with a fingerprint matching this value. The fingerprint should be SHA-1 encoded, lowercase with ':' removed. An empty value indicates that the mod is not expecting to be signed. Any incorrectness of the fingerprint, be it missing or wrong, will result in the `FMLFingerprintViolationEvent` event firing prior to any other event on the mod.
      Returns:
        A certificate fingerprint that is expected for this mod.
      Default:
        ""

    - #### modLanguage

          public abstract java.lang.String modLanguage

      The language the mod is authored in. This will be used to control certain compatibility behaviours for this mod. Valid values are currently "java", "scala"
      Returns:
        The language the mod is authored in
      Default:
        "java"

    - #### asmHookClass

          @Deprecated
          public abstract java.lang.String asmHookClass

      Deprecated.
      NOT YET IMPLEMENTED. An optional ASM hook class, that can be used to apply ASM to classes loaded from this mod. It is also given the ASM tree of the class declaring `Mod` to do with what it will.
      Returns:
        The name of a class to be loaded and executed. Must implement `IASMHook`.
      Default:
        ""

    - #### canBeDeactivated

          public abstract boolean canBeDeactivated

      If your mod doesn't have a runtime persistent effect on the state of the game, and can be disabled without side effects (minimap mods, graphical tweak mods) then you can set true here and receive the FMLDeactivationEvent to perform deactivation tasks. This does not affect administrative disabling through the system property fml.modStates or the config file fmlModState.properties. The mod will only be deactivated outside of a running game world - FML will never allow mod deactivation whilst a game server is running.
      Returns:
        if this mod can be deactivated whilst the game is open.
      Default:
        false

    - #### guiFactory

          public abstract java.lang.String guiFactory

      An optional GUI factory for this mod. This is the name of a class implementing `IModGuiFactory` that will be instantiated on the client side, and will have certain configuration/options guis requested from it.
      Returns:
        The name of a class implementing `IModGuiFactory`
      Default:
        ""

    - #### customProperties

          public abstract Mod.CustomProperty[] customProperties

      A list of custom properties for this mod. Completely up to the mod author if/when they want to put anything in here.
      Returns:
        an optional list of custom properties
      Default:
        {}