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 ResourceLocation
private final boolean
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TagEntry
(ResourceLocation pId, boolean pTag, boolean pRequired) private
TagEntry
(ExtraCodecs.TagOrElementLocation p_215922_, boolean p_215923_) -
Method Summary
Modifier and TypeMethodDescription<T> boolean
build
(TagEntry.Lookup<T> pLookup, Consumer<T> pConsumer) static TagEntry
element
(ResourceLocation pElementLocation) private ExtraCodecs.TagOrElementLocation
getId()
boolean
boolean
isTag()
static TagEntry
optionalElement
(ResourceLocation pElementLocation) static TagEntry
optionalTag
(ResourceLocation pTagLocation) static TagEntry
tag
(ResourceLocation pTagLocation) toString()
boolean
verifyIfPresent
(Predicate<ResourceLocation> pElementPredicate, Predicate<ResourceLocation> pTagPredicate) void
visitOptionalDependencies
(Consumer<ResourceLocation> pVisitor) void
visitRequiredDependencies
(Consumer<ResourceLocation> pVisitor) (package private) TagEntry
withRequired
(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()
-