public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaultedByKey<ResourceLocation,I>
Modifier and Type | Class and Description |
---|---|
static interface |
FMLControlledNamespacedRegistry.AddCallback<T> |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
inverseObjectRegistry, underlyingIntegerMap
registryObjects
Modifier and Type | Method and Description |
---|---|
<T> FMLControlledNamespacedRegistry<T> |
asType(java.lang.Class<? extends T> type) |
void |
blockId(int id) |
boolean |
containsKey(ResourceLocation name)
Does this registry contain an entry for the given key?
|
java.util.Set<? extends ResourceLocation> |
getActiveSubstitutions() |
I |
getDefaultValue() |
RegistryDelegate<I> |
getDelegate(I thing,
java.lang.Class<I> clazz) |
RegistryDelegate.Delegate<I> |
getExistingDelegate(I thing) |
int |
getId(I thing)
Get the id for the specified object.
|
int |
getId(ResourceLocation itemName)
Get the id for the specified object.
|
ResourceLocation |
getNameForObject(I p_177774_1_)
Gets the name we use to identify the given object.
|
I |
getObject(ResourceLocation name)
Fetch the object identified by the specified name or the default object.
|
I |
getObjectById(int id)
Gets the object identified by the given ID.
|
I |
getRaw(int id)
Get the object identified by the specified id.
|
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.
|
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()
validates that this registry's key is non-null
|
createUnderlyingMap, getIDForObject
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>
@Deprecated public void putObject(ResourceLocation name, I thing)
putObject
in interface IRegistry<ResourceLocation,I>
putObject
in class RegistrySimple<ResourceLocation,I>
key
- The key of the registry entryvalue
- The value of the registry entrypublic I getObject(ResourceLocation name)
getObject
in interface IRegistry<ResourceLocation,I>
getObject
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I>
name
- Unique name identifying the object.public I getObjectById(int id)
getObjectById
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I>
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 class RegistryNamespaced<ResourceLocation,I>
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 RegistryDelegate.Delegate<I> getExistingDelegate(I thing)
public void validateKey()
validateKey
in class RegistryNamespacedDefaultedByKey<ResourceLocation,I>
public java.util.Iterator<I> iterator()
iterator
in interface java.lang.Iterable<I>
iterator
in class RegistryNamespaced<ResourceLocation,I>
public <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 RegistryNamespaced<ResourceLocation,I>