public class FMLControlledNamespacedRegistry<I extends IForgeRegistryEntry<I>> extends RegistryNamespacedDefaultedByKey<ResourceLocation,I> implements IForgeRegistry<I>
IForgeRegistry.AddCallback<V>, IForgeRegistry.ClearCallback<V>, IForgeRegistry.CreateCallback<V>
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
inverseObjectRegistry, underlyingIntegerMap
registryObjects
Modifier and Type | Method and Description |
---|---|
<T extends IForgeRegistryEntry<T>> |
asType(java.lang.Class<? extends T> type) |
void |
blockId(int id) |
boolean |
containsKey(ResourceLocation name)
Determine if the registry has an entry for the specified name.
|
boolean |
containsValue(I value) |
java.util.Set<? extends ResourceLocation> |
getActiveSubstitutions() |
I |
getDefaultValue() |
RegistryDelegate<I> |
getDelegate(I thing,
java.lang.Class<I> clazz) |
java.util.Set<java.util.Map.Entry<ResourceLocation,I>> |
getEntries() |
int |
getId(I thing)
Get the id for the specified object.
|
int |
getId(ResourceLocation itemName)
Get the id for the specified object.
|
ResourceLocation |
getKey(I value) |
ResourceLocation |
getNameForObject(I p_177774_1_) |
I |
getObject(ResourceLocation name)
Fetch the object identified by the specified name or the default object.
|
I |
getObjectById(int id)
Fetch the object identified by the specified id or the default object.
|
I |
getRaw(int id)
Get the object identified by the specified id.
|
java.lang.Class<I> |
getRegistrySuperType() |
<T> T |
getSlaveMap(ResourceLocation slaveMapName,
java.lang.Class<T> type)
Retrieve the slave map of type T from the registry.
|
I |
getValue(ResourceLocation key) |
java.util.List<I> |
getValues() |
java.util.Iterator<I> |
iterator() |
void |
loadAliases(java.util.Map<ResourceLocation,ResourceLocation> aliases) |
void |
loadBlocked(java.util.Set<java.lang.Integer> blocked) |
void |
loadDummied(java.util.Set<ResourceLocation> dummied) |
void |
loadIds(java.util.Map<ResourceLocation,java.lang.Integer> ids,
java.util.Map<ResourceLocation,java.lang.Integer> missingIds,
java.util.Map<ResourceLocation,java.lang.Integer[]> remappedIds,
FMLControlledNamespacedRegistry<I> currentRegistry,
ResourceLocation registryName) |
void |
loadSubstitutions(java.util.Set<ResourceLocation> substitutions) |
void |
notifyCallbacks() |
void |
putObject(ResourceLocation name,
I thing)
Deprecated.
register through
GameRegistry instead. |
void |
register(I value) |
void |
register(int id,
ResourceLocation name,
I thing)
Deprecated.
register through
GameRegistry instead. |
void |
serializeAliases(java.util.Map<ResourceLocation,ResourceLocation> map) |
void |
serializeBlockList(java.util.Set<java.lang.Integer> blocked) |
void |
serializeDummied(java.util.Set<ResourceLocation> set) |
void |
serializeIds(java.util.Map<ResourceLocation,java.lang.Integer> idMapping) |
void |
serializeSubstitutions(java.util.Set<ResourceLocation> set) |
java.lang.Iterable<I> |
typeSafeIterable() |
void |
validateKey() |
getIDForObject, getIDForObjectBypass, getNameForObjectBypass, getObjectByIdBypass, getObjectBypass, getRandomObject
createUnderlyingMap
getKeys
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeys
@Deprecated public void register(int id, ResourceLocation name, I thing)
GameRegistry
instead.add(int, net.minecraft.util.ResourceLocation, I)
method.register
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I extends IForgeRegistryEntry<I>>
@Deprecated public void putObject(ResourceLocation name, I thing)
GameRegistry
instead.putObject
in interface IRegistry<ResourceLocation,I extends IForgeRegistryEntry<I>>
putObject
in class RegistrySimple<ResourceLocation,I extends IForgeRegistryEntry<I>>
public I getObject(ResourceLocation name)
getObject
in interface IRegistry<ResourceLocation,I extends IForgeRegistryEntry<I>>
getObject
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I extends IForgeRegistryEntry<I>>
name
- Unique name identifying the object.public I getObjectById(int id)
getObjectById
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I extends IForgeRegistryEntry<I>>
id
- ID identifying the object.public int getId(I thing)
thing
- Block/Item object.public I getRaw(int id)
id
- Block/Item id.public boolean containsKey(ResourceLocation name)
containsKey
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
containsKey
in class RegistryNamespaced<ResourceLocation,I extends IForgeRegistryEntry<I>>
name
- Object name to check.public int getId(ResourceLocation itemName)
itemName
- Block/Item registry name.public java.lang.Iterable<I> typeSafeIterable()
public void serializeIds(java.util.Map<ResourceLocation,java.lang.Integer> idMapping)
public void serializeAliases(java.util.Map<ResourceLocation,ResourceLocation> map)
public void serializeSubstitutions(java.util.Set<ResourceLocation> set)
public void serializeDummied(java.util.Set<ResourceLocation> set)
public I getDefaultValue()
public RegistryDelegate<I> getDelegate(I thing, java.lang.Class<I> clazz)
public void validateKey()
validateKey
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I extends IForgeRegistryEntry<I>>
public java.util.Iterator<I> iterator()
iterator
in interface java.lang.Iterable<I extends IForgeRegistryEntry<I>>
iterator
in class RegistryNamespaced<ResourceLocation,I extends IForgeRegistryEntry<I>>
public <T extends IForgeRegistryEntry<T>> FMLControlledNamespacedRegistry<T> asType(java.lang.Class<? extends T> type)
public void serializeBlockList(java.util.Set<java.lang.Integer> blocked)
public java.util.Set<? extends ResourceLocation> getActiveSubstitutions()
public void loadAliases(java.util.Map<ResourceLocation,ResourceLocation> aliases)
public void loadSubstitutions(java.util.Set<ResourceLocation> substitutions)
public void loadBlocked(java.util.Set<java.lang.Integer> blocked)
public void loadDummied(java.util.Set<ResourceLocation> dummied)
public void loadIds(java.util.Map<ResourceLocation,java.lang.Integer> ids, java.util.Map<ResourceLocation,java.lang.Integer> missingIds, java.util.Map<ResourceLocation,java.lang.Integer[]> remappedIds, FMLControlledNamespacedRegistry<I> currentRegistry, ResourceLocation registryName)
public void blockId(int id)
public void notifyCallbacks()
public ResourceLocation getNameForObject(I p_177774_1_)
getNameForObject
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I extends IForgeRegistryEntry<I>>
public java.lang.Class<I> getRegistrySuperType()
getRegistrySuperType
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public void register(I value)
register
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public boolean containsValue(I value)
containsValue
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public I getValue(ResourceLocation key)
getValue
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public ResourceLocation getKey(I value)
getKey
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public java.util.List<I> getValues()
getValues
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public java.util.Set<java.util.Map.Entry<ResourceLocation,I>> getEntries()
getEntries
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
public <T> T getSlaveMap(ResourceLocation slaveMapName, java.lang.Class<T> type)
IForgeRegistry
getSlaveMap
in interface IForgeRegistry<I extends IForgeRegistryEntry<I>>
T
- Type to returnslaveMapName
- The name of the slavemaptype
- The type