接口 Tag<T>
-
- 所有已知子接口:
Tag.Identified<T>
- 所有已知实现类:
RequiredTagList.TagWrapper,SetTag
public interface Tag<T>A tag is a set of objects.Tags simplifies reference to multiple objects, especially for predicate (testing against) purposes.
A tag is immutable by design. It has a builder, which is a mutable equivalent.
Its entries' iteration may be ordered or unordered, depending on the configuration from the tag builder.
- Mappings:
Namespace Name official afsintermediary net/minecraft/class_3494named net/minecraft/tag/Tag
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static classTag.BuilderA builder class to ease the creation of tags.static interfaceTag.Entrystatic interfaceTag.Identified<T>static classTag.ObjectEntrystatic classTag.OptionalObjectEntrystatic classTag.OptionalTagEntrystatic classTag.TagEntrystatic classTag.TrackedEntry
-
-
-
方法详细资料
-
codec
static <T> com.mojang.serialization.Codec<Tag<T>> codec(Supplier<TagGroup<T>> groupGetter)
- Mappings:
Namespace Name Mixin selector official aLafs;a(Ljava/util/function/Supplier;)Lcom/mojang/serialization/Codec;intermediary method_28134Lnet/minecraft/class_3494;method_28134(Ljava/util/function/Supplier;)Lcom/mojang/serialization/Codec;named codecLnet/minecraft/tag/Tag;codec(Ljava/util/function/Supplier;)Lcom/mojang/serialization/Codec;
-
contains
boolean contains(T entry)
- Mappings:
Namespace Name Mixin selector official aLafs;a(Ljava/lang/Object;)Zintermediary method_15141Lnet/minecraft/class_3494;method_15141(Ljava/lang/Object;)Znamed containsLnet/minecraft/tag/Tag;contains(Ljava/lang/Object;)Z
-
values
List<T> values()
- Mappings:
Namespace Name Mixin selector official bLafs;b()Ljava/util/List;intermediary method_15138Lnet/minecraft/class_3494;method_15138()Ljava/util/List;named valuesLnet/minecraft/tag/Tag;values()Ljava/util/List;
-
getRandom
default T getRandom(Random random)
- Mappings:
Namespace Name Mixin selector official aLafs;a(Ljava/util/Random;)Ljava/lang/Object;intermediary method_15142Lnet/minecraft/class_3494;method_15142(Ljava/util/Random;)Ljava/lang/Object;named getRandomLnet/minecraft/tag/Tag;getRandom(Ljava/util/Random;)Ljava/lang/Object;
-
of
static <T> Tag<T> of(Set<T> values)
- Mappings:
Namespace Name Mixin selector official bLafs;b(Ljava/util/Set;)Lafs;intermediary method_26777Lnet/minecraft/class_3494;method_26777(Ljava/util/Set;)Lnet/minecraft/class_3494;named ofLnet/minecraft/tag/Tag;of(Ljava/util/Set;)Lnet/minecraft/tag/Tag;
-
-