Package net.minecraftforge.registries
Interface IForgeRegistry<V extends IForgeRegistryEntry<V>>
- Type Parameters:
V
- The top level type for the registry
- All Superinterfaces:
Iterable<V>
- All Known Subinterfaces:
IForgeRegistryInternal<V>
,IForgeRegistryModifiable<V>
- All Known Implementing Classes:
ForgeRegistry
Main interface for the registry system. Use this to query the registry system.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
IForgeRegistry.AddCallback<V extends IForgeRegistryEntry<V>>
Callback fired when objects are added to the registry.static interface
IForgeRegistry.BakeCallback<V extends IForgeRegistryEntry<V>>
Callback fired when the registry is done processing.static interface
IForgeRegistry.ClearCallback<V extends IForgeRegistryEntry<V>>
Callback fired when the registry is cleared.static interface
IForgeRegistry.CreateCallback<V extends IForgeRegistryEntry<V>>
Callback fired when a registry instance is created.static interface
IForgeRegistry.DummyFactory<V extends IForgeRegistryEntry<V>>
Factory for creating dummy entries, allowing worlds to be loaded and keep the missing block references.static interface
IForgeRegistry.MissingFactory<V extends IForgeRegistryEntry<V>>
static interface
IForgeRegistry.ValidateCallback<V extends IForgeRegistryEntry<V>>
Callback fired when the registry contents are validated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey(ResourceLocation key)
boolean
containsValue(V value)
Set<Map.Entry<ResourceKey<V>,V>>
getKeys()
<T> T
getSlaveMap(ResourceLocation slaveMapName, Class<T> type)
Retrieve the slave map of type T from the registry.getValue(ResourceLocation key)
boolean
isEmpty()
void
void
registerAll(V... values)
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getRegistryName
ResourceLocation getRegistryName() -
getRegistrySuperType
-
register
-
registerAll
-
containsKey
-
containsValue
-
isEmpty
boolean isEmpty() -
getValue
-
getKey
-
getDefaultKey
-
getKeys
-
getValues
-
getEntries
-
getSlaveMap
Retrieve the slave map of type T from the registry. Slave maps are maps which are dependent on registry content in some way.- Type Parameters:
T
- Type to return- Parameters:
slaveMapName
- The name of the slavemaptype
- The type- Returns:
- The slavemap if present
-