Class EggGroupRegistry

java.lang.Object
com.pixelmonmod.pixelmon.api.registries.EggGroupRegistry

public class EggGroupRegistry extends Object
Registry for all types of EggGroup
Since:
24/06/2022
  • Constructor Details

    • EggGroupRegistry

      public EggGroupRegistry()
  • Method Details

    • register

      public static <T extends EggGroup> T register(T t)
      Registers a new EggGroup instance
      Type Parameters:
      T - The type
      Parameters:
      t - The type of egg group
      Returns:
      The unmodified egg group
    • getEggGroup

      public static <T extends EggGroup> Optional<T> getEggGroup(String key)
      Attempts to get the egg group with the given key Will return Optional.empty() if not present
      Type Parameters:
      T - The type
      Parameters:
      key - The key
      Returns:
      The egg group with the key
    • unregister

      public static <T extends EggGroup> T unregister(T t)
      Unregisters a type of EggGroup
      Type Parameters:
      T - The type
      Parameters:
      t - The type to unregister
      Returns:
      The type passed in
    • getAll

      public static List<EggGroup> getAll()
      Gets all registered egg groups
      Returns:
      The registered egg groups
    • getCount

      public static int getCount()
      Gets the number of registered EggGroup
      Returns:
      The number registered