Interface RegistryAdapter<K,V>
- Type Parameters:
K- The type of key used by the registry.V- The type of value being registered.
- All Known Implementing Classes:
BlockRegistryAdapter, CommandArgumentAdapter, CreativeModeTabAdapter, GameRegistryAdapter, GenericRegistryAdapter, IngredientTypeAdapter, MenuTypeAdapter, PotPatternAdapter, RecipeTypeAdapter, SoundEventAdapter
public interface RegistryAdapter<K,V>
Provides a loader agnostic interface for registering content.
-
Method Summary
-
Method Details
-
add
Adds a value to the registry. Values are not necessarily registered immediately.- Parameters:
key- The ID to register the value under. This ID only needs to be unique within your namespace.value- The value to register.- Returns:
- A reference to the registry entry.
-
add
Adds a value to the registry. Values are not necessarily registered immediately.- Parameters:
key- The ID to register the value under. This ID only needs to be unique within your namespace.value- A supplier that produces the value to register.- Returns:
- A reference to the registry entry.
-