Package net.minecraft.tags
Class StaticTagHelper.OptionalNamedTag<T>
java.lang.Object
net.minecraft.tags.StaticTagHelper.Wrapper<T>
net.minecraft.tags.StaticTagHelper.OptionalNamedTag<T>
- All Implemented Interfaces:
Tag<T>
,Tag.Named<T>
,Tags.IOptionalNamedTag<T>
- Enclosing class:
- StaticTagHelper<T>
private static class StaticTagHelper.OptionalNamedTag<T>
extends StaticTagHelper.Wrapper<T>
implements Tags.IOptionalNamedTag<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.tags.Tag
Tag.Builder, Tag.BuilderEntry, Tag.ElementEntry, Tag.Entry, Tag.Named<T>, Tag.OptionalElementEntry, Tag.OptionalTagEntry, Tag.TagEntry
-
Field Summary
Fields inherited from class net.minecraft.tags.StaticTagHelper.Wrapper
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.StaticTagHelper.Wrapper
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.Tag
contains, getRandomElement, getValues
-
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 classStaticTagHelper.Wrapper<T>
-