Record Class ResearchObjective
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.research.ResearchObjective
public record ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, Set<InteractionEvent> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount)
extends Record
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionResearchObjective
(net.minecraft.network.chat.Component name, DescribableResource sprite, List<InteractionEvent> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) ResearchObjective
(net.minecraft.network.chat.Component name, DescribableResource sprite, Set<InteractionEvent> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) Creates an instance of aResearchObjective
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResearchObjective.Builder
builder()
Returns the value of thecondition
record component.final boolean
Indicates whether some other object is "equal to" this one.events()
Returns the value of theevents
record component.final int
hashCode()
Returns a hash code value for this object.net.minecraft.network.chat.Component
name()
Returns the value of thename
record component.static ResearchObjective
read
(net.minecraft.network.FriendlyByteBuf buffer) int
Returns the value of therequiredAmount
record component.result()
Returns the value of theresult
record component.sprite()
Returns the value of thesprite
record component.final String
toString()
Returns a string representation of this record class.void
write
(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
CODEC
-
-
Constructor Details
-
ResearchObjective
public ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, List<InteractionEvent> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) -
ResearchObjective
public ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, Set<InteractionEvent> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) Creates an instance of aResearchObjective
record class.- Parameters:
name
- the value for thename
record componentsprite
- the value for thesprite
record componentevents
- the value for theevents
record componentcondition
- the value for thecondition
record componentresult
- the value for theresult
record componentrequiredAmount
- the value for therequiredAmount
record component
-
-
Method Details
-
read
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) -
builder
-
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 '=='. -
name
public net.minecraft.network.chat.Component name()Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
sprite
Returns the value of thesprite
record component.- Returns:
- the value of the
sprite
record component
-
events
Returns the value of theevents
record component.- Returns:
- the value of the
events
record component
-
condition
Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-
requiredAmount
public int requiredAmount()Returns the value of therequiredAmount
record component.- Returns:
- the value of the
requiredAmount
record component
-