接口 IForgeRegistry<V>
- 类型参数:
V
- The top level type for the registry
- 所有超级接口:
Iterable<V>
- 所有已知子接口:
IForgeRegistryInternal<V>
,IForgeRegistryModifiable<V>
- 所有已知实现类:
ForgeRegistry
Main interface for the registry system. Use this to query the registry system.
-
嵌套类概要
嵌套类修饰符和类型接口说明static interface
Callback fired when objects are added to the registry.static interface
Callback fired when the registry is done processing.static interface
Callback fired when the registry is cleared.static interface
Callback fired when a registry instance is created.static interface
static final record
static interface
Callback fired when the registry contents are validated. -
方法概要
修饰符和类型方法说明boolean
boolean
containsValue
(V value) @NotNull com.mojang.serialization.Codec
<V> getCodec()
@Nullable ResourceLocation
@NotNull Optional
<Holder.Reference<V>> getDelegate
(ResourceKey<V> rkey) @NotNull Optional
<Holder.Reference<V>> @NotNull Optional
<Holder.Reference<V>> getDelegate
(V value) getDelegateOrThrow
(ResourceKey<V> rkey) getDelegateOrThrow
(V value) @NotNull Set
<Map.Entry<ResourceKey<V>, V>> getHolder
(ResourceKey<V> key) This method exists purely as a stopgap for vanilla compatibility.getHolder
(ResourceLocation location) This method exists purely as a stopgap for vanilla compatibility.This method exists purely as a stopgap for vanilla compatibility.@Nullable ResourceLocation
@NotNull Set
<ResourceLocation> getKeys()
@NotNull Optional
<ResourceKey<V>> getResourceKey
(V value) <T> T
getSlaveMap
(IForgeRegistry.SlaveKey<T> key) Retrieve the slave map of type T from the registry.getValue
(ResourceLocation key) @NotNull Collection
<V> boolean
isEmpty()
void
The supplied string key will be prefixed with the currently active mod's mod id.void
register
(ResourceLocation key, V value) @Nullable ITagManager
<V> tags()
从接口继承的方法 java.lang.Iterable
forEach, iterator, spliterator
-
方法详细资料
-
getRegistryKey
ResourceKey<Registry<V>> getRegistryKey() -
getRegistryName
ResourceLocation getRegistryName() -
register
The supplied string key will be prefixed with the currently active mod's mod id. If the supplied name already has a prefix that is different, it will be used and a warning will be logged. -
register
-
containsKey
-
containsValue
-
isEmpty
boolean isEmpty() -
getValue
-
getKey
-
getDefaultKey
-
getResourceKey
-
getKeys
-
getValues
-
getEntries
-
getCodec
- 另请参阅:
-
getHolder
This method exists purely as a stopgap for vanilla compatibility. For anything tag related, usetags()
.- 另请参阅:
-
getHolder
This method exists purely as a stopgap for vanilla compatibility. For anything tag related, usetags()
. -
getHolder
This method exists purely as a stopgap for vanilla compatibility. For anything tag related, usetags()
. -
tags
- 返回:
- an instance of
ITagManager
if this registry supports tags and/or has a wrapper registry, null otherwise
-
getDelegate
-
getDelegateOrThrow
-
getDelegate
-
getDelegateOrThrow
-
getDelegate
-
getDelegateOrThrow
-
getSlaveMap
Retrieve the slave map of type T from the registry. Slave maps are maps which are dependent on registry content in some way.- 类型参数:
T
- Type to return- 参数:
slaveMapName
- The name of the slavemaptype
- The type- 返回:
- The slavemap if present
-