Record Class QuestRewards.Choice
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.quest.QuestRewards.Choice
- Enclosing class:
QuestRewards
public static record QuestRewards.Choice(net.minecraft.world.item.ItemStack stack, int weight)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChoice(net.minecraft.world.item.ItemStack stack, int weight) Creates an instance of aChoicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Constructor Details
-
Choice
public Choice(net.minecraft.world.item.ItemStack stack, int weight) Creates an instance of aChoicerecord class.- Parameters:
stack- the value for thestackrecord componentweight- the value for theweightrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-