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<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, List<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) Creates an instance of aResearchObjectiverecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResearchObjective.Builderbuilder()Returns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events()Returns the value of theeventsrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.network.chat.Componentname()Returns the value of thenamerecord component.static ResearchObjectiveread(net.minecraft.network.FriendlyByteBuf buffer) intReturns the value of therequiredAmountrecord component.result()Returns the value of theresultrecord component.sprite()Returns the value of thespriterecord component.final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
CODEC
-
-
Constructor Details
-
ResearchObjective
public ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, List<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) -
ResearchObjective
public ResearchObjective(net.minecraft.network.chat.Component name, DescribableResource sprite, Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<InteractionResult> result, int requiredAmount) Creates an instance of aResearchObjectiverecord class.- Parameters:
name- the value for thenamerecord componentsprite- the value for thespriterecord componentevents- the value for theeventsrecord componentcondition- the value for theconditionrecord componentresult- the value for theresultrecord componentrequiredAmount- the value for therequiredAmountrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-
events
Returns the value of theeventsrecord component.- Returns:
- the value of the
eventsrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
requiredAmount
public int requiredAmount()Returns the value of therequiredAmountrecord component.- Returns:
- the value of the
requiredAmountrecord component
-