Record Class DataComponentPredicate
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.data.predicate.DataComponentPredicate
public record DataComponentPredicate(DataComponentPredicate.PredicateType type, com.viaversion.nbt.tag.Tag predicate)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Type<DataComponentPredicate[]>static final Type<DataComponentPredicate[]>static final Type<DataComponentPredicate>static final Type<DataComponentPredicate> -
Constructor Summary
ConstructorsConstructorDescriptionDataComponentPredicate(int predicateType, com.viaversion.nbt.tag.Tag predicate) DataComponentPredicate(DataComponentPredicate.PredicateType type, com.viaversion.nbt.tag.Tag predicate) Creates an instance of aDataComponentPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.viaversion.nbt.tag.TagReturns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
TYPE1_21_5
-
ARRAY_TYPE1_21_5
-
TYPE1_21_11
-
ARRAY_TYPE1_21_11
-
-
Constructor Details
-
DataComponentPredicate
public DataComponentPredicate(int predicateType, com.viaversion.nbt.tag.Tag predicate) -
DataComponentPredicate
public DataComponentPredicate(DataComponentPredicate.PredicateType type, com.viaversion.nbt.tag.Tag predicate) Creates an instance of aDataComponentPredicaterecord class.- Parameters:
type- the value for thetyperecord componentpredicate- the value for thepredicaterecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
predicate
public com.viaversion.nbt.tag.Tag predicate()Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-