类 TagConventionMappings
java.lang.Object
net.minecraftforge.common.TagConventionMappings
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static ResourceLocation
legacyToCommon
(ResourceKey<Registry<T>> registryKey, ResourceLocation legacyTagRessourceLocation, List<TagKey<?>> replacementTags) Same aslegacyToCommon(ResourceKey, ResourceLocation, TagKey)
but for multiple replacement tags.legacyToCommon
(ResourceKey<Registry<T>> registryKey, ResourceLocation legacyTagResourceLocation, TagKey<R> replacementTag) Creates a mapping from a legacy tag to a common convention equivalent.
-
字段详细资料
-
MAPPINGS
A map of known legacy tags to their common convention equivalents.
-
-
构造器详细资料
-
TagConventionMappings
private TagConventionMappings()
-
-
方法详细资料
-
legacyToCommon
private static <T,R> Map.Entry<TagKey<T>,String> legacyToCommon(ResourceKey<Registry<T>> registryKey, ResourceLocation legacyTagResourceLocation, TagKey<R> replacementTag) Creates a mapping from a legacy tag to a common convention equivalent.Example:
legacyToCommon(Registries.BLOCK, forgeRl("cobblestone"), Tags.Blocks.COBBLESTONES)
forforge:cobblestone
->c:cobblestones
- 参数:
registryKey
- Example:引用无效
net.minecraft.core.registries.Registries.BLOCK
legacyTagResourceLocation
- Example:forgeRl("cobblestone")
replacementTag
- Example:Tags.Blocks.COBBLESTONES
- 返回:
- A map entry with the legacy tag's TagKey and the suggested replacement tag ID.
-
legacyToCommon
private static <T> Map.Entry<TagKey<T>,String> legacyToCommon(ResourceKey<Registry<T>> registryKey, ResourceLocation legacyTagRessourceLocation, List<TagKey<?>> replacementTags) Same aslegacyToCommon(ResourceKey, ResourceLocation, TagKey)
but for multiple replacement tags. This is useful when a single legacy tag is intended to be replaced by combining multiple common convention tags. -
forgeRl
-