public class ForgeRegistry<V extends IForgeRegistryEntry<V>> extends java.lang.Object implements IForgeRegistryInternal<V>, IForgeRegistryModifiable<V>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ForgeRegistry.Snapshot  | 
IForgeRegistry.AddCallback<V extends IForgeRegistryEntry<V>>, IForgeRegistry.ClearCallback<V extends IForgeRegistryEntry<V>>, IForgeRegistry.CreateCallback<V extends IForgeRegistryEntry<V>>, IForgeRegistry.DummyFactory<V extends IForgeRegistryEntry<V>>, IForgeRegistry.MissingFactory<V extends IForgeRegistryEntry<V>>, IForgeRegistry.ValidateCallback<V extends IForgeRegistryEntry<V>>| Modifier and Type | Field and Description | 
|---|---|
static boolean | 
DEBUG  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()  | 
boolean | 
containsKey(ResourceLocation key)  | 
boolean | 
containsValue(V value)  | 
void | 
freeze()
Used to control the times where people can modify this registry. 
 | 
java.util.Set<java.util.Map.Entry<ResourceLocation,V>> | 
getEntries()  | 
int | 
getID(ResourceLocation name)  | 
int | 
getID(V value)  | 
ResourceLocation | 
getKey(V value)  | 
java.util.Set<ResourceLocation> | 
getKeys()  | 
RegistryEvent.MissingMappings<?> | 
getMissingEvent(ResourceLocation name,
               java.util.Map<ResourceLocation,java.lang.Integer> map)  | 
V | 
getRaw(int id)
Deprecated.  
 | 
java.lang.Class<V> | 
getRegistrySuperType()  | 
<T> T | 
getSlaveMap(ResourceLocation name,
           java.lang.Class<T> type)
Retrieve the slave map of type T from the registry. 
 | 
V | 
getValue(int id)  | 
V | 
getValue(ResourceLocation key)  | 
java.util.List<V> | 
getValues()
Deprecated. 
 
use  
getValuesCollection() to avoid copying | 
java.util.Collection<V> | 
getValuesCollection()  | 
boolean | 
isLocked()  | 
java.util.Iterator<V> | 
iterator()  | 
void | 
loadIds(java.util.Map<ResourceLocation,java.lang.Integer> ids,
       java.util.Map<ResourceLocation,java.lang.String> overrides,
       java.util.Map<ResourceLocation,java.lang.Integer> missing,
       java.util.Map<ResourceLocation,java.lang.Integer[]> remapped,
       ForgeRegistry<V> old,
       ResourceLocation name)  | 
ForgeRegistry.Snapshot | 
makeSnapshot()  | 
void | 
register(V value)  | 
void | 
registerAll(V... values)  | 
V | 
remove(ResourceLocation key)  | 
void | 
setSlaveMap(ResourceLocation name,
           java.lang.Object obj)  | 
void | 
unfreeze()  | 
public void register(V value)
register in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V extends IForgeRegistryEntry<V>>public java.lang.Class<V> getRegistrySuperType()
getRegistrySuperType in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public void registerAll(V... values)
registerAll in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public boolean containsKey(ResourceLocation key)
containsKey in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public boolean containsValue(V value)
containsValue in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public V getValue(ResourceLocation key)
getValue in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public ResourceLocation getKey(V value)
getKey in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public java.util.Set<ResourceLocation> getKeys()
getKeys in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>@Deprecated public java.util.List<V> getValues()
getValuesCollection() to avoid copyinggetValues in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public java.util.Collection<V> getValuesCollection()
getValuesCollection in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public java.util.Set<java.util.Map.Entry<ResourceLocation,V>> getEntries()
getEntries in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>public <T> T getSlaveMap(ResourceLocation name, java.lang.Class<T> type)
IForgeRegistrygetSlaveMap in interface IForgeRegistry<V extends IForgeRegistryEntry<V>>T - Type to returnname - The name of the slavemaptype - The typepublic void setSlaveMap(ResourceLocation name, java.lang.Object obj)
setSlaveMap in interface IForgeRegistryInternal<V extends IForgeRegistryEntry<V>>public int getID(V value)
public int getID(ResourceLocation name)
public V getValue(int id)
@Deprecated public V getRaw(int id)
public void clear()
clear in interface IForgeRegistryModifiable<V extends IForgeRegistryEntry<V>>public V remove(ResourceLocation key)
remove in interface IForgeRegistryModifiable<V extends IForgeRegistryEntry<V>>public boolean isLocked()
isLocked in interface IForgeRegistryModifiable<V extends IForgeRegistryEntry<V>>public void freeze()
public void unfreeze()
public void loadIds(java.util.Map<ResourceLocation,java.lang.Integer> ids, java.util.Map<ResourceLocation,java.lang.String> overrides, java.util.Map<ResourceLocation,java.lang.Integer> missing, java.util.Map<ResourceLocation,java.lang.Integer[]> remapped, ForgeRegistry<V> old, ResourceLocation name)
public ForgeRegistry.Snapshot makeSnapshot()
public RegistryEvent.MissingMappings<?> getMissingEvent(ResourceLocation name, java.util.Map<ResourceLocation,java.lang.Integer> map)