public class Tag<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Tag.Builder<T> |
static interface |
Tag.ITagEntry<T> |
static class |
Tag.ListEntry<T> |
static class |
Tag.TagEntry<T> |
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<Tag.ITagEntry<T>> |
entries |
private boolean |
replace |
private ResourceLocation |
resourceLocation |
private java.util.Set<T> |
taggedItems |
Modifier | Constructor and Description |
---|---|
|
Tag(ResourceLocation resourceLocationIn) |
|
Tag(ResourceLocation resourceLocationIn,
java.util.Collection<Tag.ITagEntry<T>> entriesIn,
boolean preserveOrder) |
private |
Tag(ResourceLocation resourceLocationIn,
java.util.Collection<Tag.ITagEntry<T>> entriesIn,
boolean preserveOrder,
boolean replace) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T itemIn) |
java.util.Collection<T> |
getAllElements() |
java.util.Collection<Tag.ITagEntry<T>> |
getEntries() |
ResourceLocation |
getId() |
T |
getRandomElement(java.util.Random random) |
com.google.gson.JsonObject |
serialize(java.util.function.Function<T,ResourceLocation> getNameForObject) |
private final ResourceLocation resourceLocation
private final java.util.Set<T> taggedItems
private final java.util.Collection<Tag.ITagEntry<T>> entries
private boolean replace
public Tag(ResourceLocation resourceLocationIn)
public Tag(ResourceLocation resourceLocationIn, java.util.Collection<Tag.ITagEntry<T>> entriesIn, boolean preserveOrder)
private Tag(ResourceLocation resourceLocationIn, java.util.Collection<Tag.ITagEntry<T>> entriesIn, boolean preserveOrder, boolean replace)
public com.google.gson.JsonObject serialize(java.util.function.Function<T,ResourceLocation> getNameForObject)
public boolean contains(T itemIn)
public java.util.Collection<T> getAllElements()
public java.util.Collection<Tag.ITagEntry<T>> getEntries()
public T getRandomElement(java.util.Random random)
public ResourceLocation getId()