Record Class ConditionalAdvancement.Result
java.lang.Object
java.lang.Record
net.minecraftforge.common.crafting.ConditionalAdvancement.Result
- All Implemented Interfaces:
ConditionalAdvancement.IResult
- Enclosing class:
- ConditionalAdvancement
private static record ConditionalAdvancement.Result(List<ConditionalAdvancement.Pair> advancements)
extends Record
implements ConditionalAdvancement.IResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ConditionalAdvancement.Pair>The field for theadvancementsrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateResult(List<ConditionalAdvancement.Pair> advancements) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.google.gson.JsonObjectfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
advancements
The field for theadvancementsrecord component.
-
-
Constructor Details
-
Result
Creates an instance of aResultrecord class.- Parameters:
advancements- the value for theadvancementsrecord component
-
-
Method Details
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJsonin interfaceConditionalAdvancement.IResult
-
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). -
advancements
Returns the value of theadvancementsrecord component.- Returns:
- the value of the
advancementsrecord component
-