Package net.minecraft.tags
Class TagRegistry.OptionalNamedTag<T>
java.lang.Object
net.minecraft.tags.TagRegistry.NamedTag<T>
net.minecraft.tags.TagRegistry.OptionalNamedTag<T>
- All Implemented Interfaces:
ITag<T>
,ITag.INamedTag<T>
,Tags.IOptionalNamedTag<T>
- Enclosing class:
- TagRegistry<T>
private static class TagRegistry.OptionalNamedTag<T>
extends TagRegistry.NamedTag<T>
implements Tags.IOptionalNamedTag<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.tags.ITag
ITag.Builder, ITag.INamedTag<T>, ITag.ITagEntry, ITag.ItemEntry, ITag.OptionalItemEntry, ITag.OptionalTagEntry, ITag.Proxy, ITag.TagEntry
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Fields inherited from class net.minecraft.tags.TagRegistry.NamedTag
name, tag
-
Constructor Summary
ModifierConstructorDescriptionprivate
OptionalNamedTag
(ResourceLocation name, Set<Supplier<T>> defaults) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the current state is defaulted.toString()
Methods inherited from class net.minecraft.tags.TagRegistry.NamedTag
contains, equals, getName, getValues, hashCode, rebind
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.tags.ITag
contains, getRandomElement, getValues
Methods inherited from interface net.minecraft.tags.ITag.INamedTag
getName
-
Field Details
-
defaults
-
defaulted
private boolean defaulted
-
-
Constructor Details
-
OptionalNamedTag
-
-
Method Details
-
isDefaulted
public boolean isDefaulted()Description copied from interface:Tags.IOptionalNamedTag
Returns true if the current state is defaulted. This means we have connected to a server that does not contain this tag. The values referenced in this tag may be empty, or some values specified by the original tag creator.- Specified by:
isDefaulted
in interfaceTags.IOptionalNamedTag<T>
-
resolveDefaulted
-
toString
- Overrides:
toString
in classTagRegistry.NamedTag<T>
-