Package net.minecraft.tags
Class TagEntry
java.lang.Object
net.minecraft.tags.TagEntry
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TagEntry> private static final com.mojang.serialization.Codec<TagEntry> private final ResourceLocationprivate final booleanprivate final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTagEntry(ResourceLocation pId, boolean pTag, boolean pRequired) privateTagEntry(ExtraCodecs.TagOrElementLocation p_215922_, boolean p_215923_) -
Method Summary
Modifier and TypeMethodDescription<T> booleanbuild(TagEntry.Lookup<T> pLookup, Consumer<T> pConsumer) static TagEntryelement(ResourceLocation pElementLocation) private ExtraCodecs.TagOrElementLocationgetId()booleanbooleanisTag()static TagEntryoptionalElement(ResourceLocation pElementLocation) static TagEntryoptionalTag(ResourceLocation pTagLocation) static TagEntrytag(ResourceLocation pTagLocation) toString()booleanverifyIfPresent(Predicate<ResourceLocation> pElementPredicate, Predicate<ResourceLocation> pTagPredicate) voidvisitOptionalDependencies(Consumer<ResourceLocation> pVisitor) voidvisitRequiredDependencies(Consumer<ResourceLocation> pVisitor) (package private) TagEntrywithRequired(boolean required) Returns a copy of this entry with the required flag set to the given parameter.
-
Field Details
-
FULL_CODEC
-
CODEC
-
id
-
tag
private final boolean tag -
required
private final boolean required
-
-
Constructor Details
-
TagEntry
-
TagEntry
-
-
Method Details
-
elementOrTag
-
withRequired
Returns a copy of this entry with the required flag set to the given parameter.- Parameters:
required- whether the new entry is required- Returns:
- a copy of this entry with the required flag set to the given parameter
-
element
-
optionalElement
-
tag
-
optionalTag
-
build
-
visitRequiredDependencies
-
visitOptionalDependencies
-
verifyIfPresent
public boolean verifyIfPresent(Predicate<ResourceLocation> pElementPredicate, Predicate<ResourceLocation> pTagPredicate) -
toString
-
getId
-
isRequired
public boolean isRequired() -
isTag
public boolean isTag()
-