Record Class ClientTagEntry
java.lang.Object
java.lang.Record
dev.dhyces.trimmed.api.data.client.tag.ClientTagEntry
public record ClientTagEntry(net.minecraft.util.ExtraCodecs.TagOrElementLocation tagOrElementLocation, boolean isRequired)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ClientTagEntry> static final com.mojang.serialization.Codec<ClientTagEntry> -
Constructor Summary
ConstructorsConstructorDescriptionClientTagEntry(net.minecraft.util.ExtraCodecs.TagOrElementLocation tagOrElementLocation, boolean isRequired) Creates an instance of aClientTagEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ClientTagEntryclientTagKey(ClientTagKey<T> clientTagKey, boolean isRequired) static ClientTagEntryelement(net.minecraft.resources.ResourceLocation element, boolean isRequired) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId()<T> ClientTagKey<T> getTag(KeyResolver<T> keyResolver) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisRequiredrecord component.booleanisTag()net.minecraft.util.ExtraCodecs.TagOrElementLocationReturns the value of thetagOrElementLocationrecord component.final StringtoString()Returns a string representation of this record class.booleanverifyExists(Predicate<net.minecraft.resources.ResourceLocation> elementPredicate, Predicate<net.minecraft.resources.ResourceLocation> tagPredicate)
-
Field Details
-
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
ClientTagEntry
public ClientTagEntry(net.minecraft.util.ExtraCodecs.TagOrElementLocation tagOrElementLocation, boolean isRequired) Creates an instance of aClientTagEntryrecord class.- Parameters:
tagOrElementLocation- the value for thetagOrElementLocationrecord componentisRequired- the value for theisRequiredrecord component
-
-
Method Details
-
isTag
public boolean isTag() -
getId
public net.minecraft.resources.ResourceLocation getId() -
getTag
-
verifyExists
-
element
public static ClientTagEntry element(net.minecraft.resources.ResourceLocation element, boolean isRequired) -
clientTagKey
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tagOrElementLocation
public net.minecraft.util.ExtraCodecs.TagOrElementLocation tagOrElementLocation()Returns the value of thetagOrElementLocationrecord component.- Returns:
- the value of the
tagOrElementLocationrecord component
-
isRequired
public boolean isRequired()Returns the value of theisRequiredrecord component.- Returns:
- the value of the
isRequiredrecord component
-