Package com.simibubi.create.api.registry
Interface SimpleRegistry.Multi<K,V>
- All Superinterfaces:
SimpleRegistry<K,List<V>>
- Enclosing interface:
SimpleRegistry<K,V>
An extension of SimpleRegistry that handles multiple registrations per object.
SimpleRegistry.register(Object, Object) Will set a whole list of registrations - use add(Object, Object) to add one.
Here, all Providers are always queried, and all of their results are returned. Their provided values are also
provided on top of explicit registrations - they do not take priority.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.simibubi.create.api.registry.SimpleRegistry
SimpleRegistry.Multi<K,V>, SimpleRegistry.Provider<K, V> -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddProvider(SimpleRegistry.Provider<K, V> provider) Shortcut that wraps a single-value provider into one that provides a List.static <K,V> SimpleRegistry.Multi <K, V> create()Never returns null, will return an empty list if no registrations are presentNever returns null, will return an empty list if no registrations are presentMethods inherited from interface com.simibubi.create.api.registry.SimpleRegistry
invalidate, register, registerProvider
-
Method Details
-
add
-
addProvider
Shortcut that wraps a single-value provider into one that provides a List. -
get
Never returns null, will return an empty list if no registrations are present- Specified by:
getin interfaceSimpleRegistry<K,V>
-
get
Never returns null, will return an empty list if no registrations are present- Specified by:
getin interfaceSimpleRegistry<K,V>
-
create
-