Package net.minecraftforge.registries
Interface IForgeRegistry<V extends IForgeRegistryEntry<V>>
-
- Type Parameters:
V- The top level type for the registry
- All Superinterfaces:
java.lang.Iterable<V>
- All Known Subinterfaces:
IForgeRegistryInternal<V>,IForgeRegistryModifiable<V>
- All Known Implementing Classes:
ForgeRegistry
public interface IForgeRegistry<V extends IForgeRegistryEntry<V>> extends java.lang.Iterable<V>Main interface for the registry system. Use this to query the registry system.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIForgeRegistry.AddCallback<V extends IForgeRegistryEntry<V>>Callback fired when objects are added to the registry.static interfaceIForgeRegistry.BakeCallback<V extends IForgeRegistryEntry<V>>Callback fired when the registry is done processing.static interfaceIForgeRegistry.ClearCallback<V extends IForgeRegistryEntry<V>>Callback fired when the registry is cleared.static interfaceIForgeRegistry.CreateCallback<V extends IForgeRegistryEntry<V>>Callback fired when a registry instance is created.static interfaceIForgeRegistry.DummyFactory<V extends IForgeRegistryEntry<V>>Factory for creating dummy entries, allowing worlds to be loaded and keep the missing block references.static interfaceIForgeRegistry.MissingFactory<V extends IForgeRegistryEntry<V>>static interfaceIForgeRegistry.ValidateCallback<V extends IForgeRegistryEntry<V>>Callback fired when the registry contents are validated.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsKey(ResourceLocation key)booleancontainsValue(V value)ResourceLocationgetDefaultKey()java.util.Set<java.util.Map.Entry<RegistryKey<V>,V>>getEntries()ResourceLocationgetKey(V value)java.util.Set<ResourceLocation>getKeys()ResourceLocationgetRegistryName()java.lang.Class<V>getRegistrySuperType()<T> TgetSlaveMap(ResourceLocation slaveMapName, java.lang.Class<T> type)Retrieve the slave map of type T from the registry.VgetValue(ResourceLocation key)java.util.Collection<V>getValues()booleanisEmpty()voidregister(V value)voidregisterAll(V... values)
-
-
-
Method Detail
-
getRegistryName
ResourceLocation getRegistryName()
-
getRegistrySuperType
java.lang.Class<V> getRegistrySuperType()
-
register
void register(V value)
-
registerAll
void registerAll(V... values)
-
containsKey
boolean containsKey(ResourceLocation key)
-
containsValue
boolean containsValue(V value)
-
isEmpty
boolean isEmpty()
-
getValue
@Nullable V getValue(ResourceLocation key)
-
getKey
@Nullable ResourceLocation getKey(V value)
-
getDefaultKey
@Nullable ResourceLocation getDefaultKey()
-
getKeys
@Nonnull java.util.Set<ResourceLocation> getKeys()
-
getValues
@Nonnull java.util.Collection<V> getValues()
-
getEntries
@Nonnull java.util.Set<java.util.Map.Entry<RegistryKey<V>,V>> getEntries()
-
getSlaveMap
<T> T getSlaveMap(ResourceLocation slaveMapName, java.lang.Class<T> type)
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
-
-