Record Class AdvancementTests.CustomNamePredicate
java.lang.Object
java.lang.Record
net.neoforged.neoforge.debug.entity.player.AdvancementTests.CustomNamePredicate
- All Implemented Interfaces:
ItemSubPredicate
- Enclosing class:
AdvancementTests
public static record AdvancementTests.CustomNamePredicate(int data1, int data2)
extends Record
implements ItemSubPredicate
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.critereon.ItemSubPredicate
ItemSubPredicate.Type<T extends ItemSubPredicate>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thedata1
record component.private final int
The field for thedata2
record component.Fields inherited from interface net.minecraft.advancements.critereon.ItemSubPredicate
CODEC
-
Constructor Summary
ConstructorDescriptionCustomNamePredicate
(int data1, int data2) Creates an instance of aCustomNamePredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
data1()
Returns the value of thedata1
record component.int
data2()
Returns the value of thedata2
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
data1
private final int data1The field for thedata1
record component. -
data2
private final int data2The field for thedata2
record component.
-
-
Constructor Details
-
CustomNamePredicate
public CustomNamePredicate(int data1, int data2) Creates an instance of aCustomNamePredicate
record class.- Parameters:
data1
- the value for thedata1
record componentdata2
- the value for thedata2
record component
-
-
Method Details
-
matches
- Specified by:
matches
in interfaceItemSubPredicate
-
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 with '=='. -
data1
public int data1()Returns the value of thedata1
record component.- Returns:
- the value of the
data1
record component
-
data2
public int data2()Returns the value of thedata2
record component.- Returns:
- the value of the
data2
record component
-