Class EggGroupRegistry
java.lang.Object
com.pixelmonmod.pixelmon.api.registries.EggGroupRegistry
Registry for all types of
EggGroup- Since:
- 24/06/2022
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAll()Gets all registered egg groupsstatic intgetCount()Gets the number of registeredEggGroupgetEggGroup(String key) Attempts to get the egg group with the given key Will returnOptional.empty()if not presentstatic <T extends EggGroup>
Tregister(T t) Registers a newEggGroupinstancestatic <T extends EggGroup>
Tunregister(T t) Unregisters a type ofEggGroup
-
Constructor Details
-
EggGroupRegistry
public EggGroupRegistry()
-
-
Method Details
-
register
Registers a newEggGroupinstance- Type Parameters:
T- The type- Parameters:
t- The type of egg group- Returns:
- The unmodified egg group
-
getEggGroup
Attempts to get the egg group with the given key Will returnOptional.empty()if not present- Type Parameters:
T- The type- Parameters:
key- The key- Returns:
- The egg group with the key
-
unregister
Unregisters a type ofEggGroup- Type Parameters:
T- The type- Parameters:
t- The type to unregister- Returns:
- The type passed in
-
getAll
Gets all registered egg groups- Returns:
- The registered egg groups
-
getCount
public static int getCount()Gets the number of registeredEggGroup- Returns:
- The number registered
-