类 ForgeRegistryTagManager<V>
java.lang.Object
net.minecraftforge.registries.ForgeRegistryTagManager<V>
- 所有已实现的接口:
Iterable<ITag<V>>
,ITagManager<V>
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
Adds defaults to an existing tag key.(专用程序包) void
createOptionalTagKey
(@NotNull ResourceLocation location, @NotNull Set<? extends Supplier<V>> defaults) Creates a tag key that will use the set of defaults if the tag is not loaded from any datapacks.createTagKey
(@NotNull ResourceLocation location) Creates a tag key based on the location and the forge registry linked to this tag manager.@NotNull Optional
<IReverseTag<V>> getReverseTag
(V value) Queries a reverse tag for a given value from the forge registry linked to this tag manager.Queries this tag manager for a tag with the given tag key.boolean
isKnownTagName
(@NotNull TagKey<V> name) Checks whether the given tag key exists in this tag manager and is bound.iterator()
stream()
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
字段详细资料
-
owner
-
tags
-
-
构造器详细资料
-
ForgeRegistryTagManager
ForgeRegistryTagManager(ForgeRegistry<V> owner)
-
-
方法详细资料
-
bind
-
getTag
从接口复制的说明:ITagManager
Queries this tag manager for a tag with the given tag key. If it does not exist, this will create an empty tag and return it.- 指定者:
getTag
在接口中ITagManager<V>
- 另请参阅:
-
getReverseTag
从接口复制的说明:ITagManager
Queries a reverse tag for a given value from the forge registry linked to this tag manager. A reverse tag stores all tags that the givenvalue
is contained in.- 指定者:
getReverseTag
在接口中ITagManager<V>
- 参数:
value
- A value currently registered to the forge registry linked to this tag manager- 返回:
- A reverse tag for the given value, or an empty optional if the value is not registered
-
isKnownTagName
从接口复制的说明:ITagManager
Checks whether the given tag key exists in this tag manager and is bound. UnlikeITagManager.getTag(TagKey)
, this method will not create the tag if it does not exist.- 指定者:
isKnownTagName
在接口中ITagManager<V>
- 另请参阅:
-
iterator
-
stream
- 指定者:
stream
在接口中ITagManager<V>
- 返回:
- A stream of all tags stored in this tag manager, bound or unbound.
-
getTagNames
- 指定者:
getTagNames
在接口中ITagManager<V>
- 返回:
- A stream of all tag keys stored in this tag manager, bound or unbound.
-
createTagKey
从接口复制的说明:ITagManager
Creates a tag key based on the location and the forge registry linked to this tag manager. Custom registries can useDeferredRegister.createTagKey(ResourceLocation)
to create tag keys before the tag manager is created.- 指定者:
createTagKey
在接口中ITagManager<V>
- 另请参阅:
-
createOptionalTagKey
@NotNull public @NotNull TagKey<V> createOptionalTagKey(@NotNull @NotNull ResourceLocation location, @NotNull @NotNull Set<? extends Supplier<V>> defaults) 从接口复制的说明:ITagManager
Creates a tag key that will use the set of defaults if the tag is not loaded from any datapacks. Useful on the client side when a server may not provide a specific tag. Custom registries can useDeferredRegister.addOptionalTagDefaults(TagKey, Set)
to create tag keys before the tag manager is created.- 指定者:
createOptionalTagKey
在接口中ITagManager<V>
- 另请参阅:
-
addOptionalTagDefaults
public void addOptionalTagDefaults(@NotNull @NotNull TagKey<V> name, @NotNull @NotNull Set<? extends Supplier<V>> defaults) 从接口复制的说明:ITagManager
Adds defaults to an existing tag key. The set of defaults will be bound to the tag if the tag is not loaded from any datapacks. Useful on the client side when a server may not provide a specific tag. Custom registries can useDeferredRegister.addOptionalTagDefaults(TagKey, Set)
to add defaults before the tag manager is created.- 指定者:
addOptionalTagDefaults
在接口中ITagManager<V>
- 另请参阅:
-