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
Modifier and TypeFieldDescriptionprivate final List<ConditionalAdvancement.Pair>
The field for theadvancements
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
Result
(List<ConditionalAdvancement.Pair> advancements) Creates an instance of aResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancements
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.com.google.gson.JsonObject
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
advancements
The field for theadvancements
record component.
-
-
Constructor Details
-
Result
Creates an instance of aResult
record class.- Parameters:
advancements
- the value for theadvancements
record component
-
-
Method Details
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in 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 theadvancements
record component.- Returns:
- the value of the
advancements
record component
-