Class PokemonConverterRegistry

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.export.PokemonConverterRegistry

public class PokemonConverterRegistry extends Object
A registry class containing the registered PokemonConverterProxy types The default instance is used by the editor for parsing logic
  • Field Details

  • Constructor Details

    • PokemonConverterRegistry

      public PokemonConverterRegistry()
  • Method Details

    • registerConverter

      public static <T extends PokemonConverterProxy> T registerConverter(String id, T proxy)
      Registers a converter with the given id
      Type Parameters:
      T - The class type
      Parameters:
      id - The id of the converter
      proxy - The converter instance
      Returns:
      Unmodified version of the converter
    • getConverter

      public static Optional<PokemonConverterProxy> getConverter(String id)
      Attempts to get the converter with the given ID
      Parameters:
      id - The id to search for
      Returns:
      Optional of converter with given id
    • getDefault

      public static PokemonConverterProxy getDefault()
      Gets registered default instance
      Returns:
      The default converter used in the mod
    • setDefault

      public static void setDefault(PokemonConverterProxy converter)
      Sets the default converter used by the mod
      Parameters:
      converter - The default