Record Class QuestRewards
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.quest.QuestRewards
public record QuestRewards(List<net.minecraft.world.item.ItemStack> items, List<QuestRewards.Choice> random, int rolls)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQuestRewards(List<net.minecraft.world.item.ItemStack> items, List<QuestRewards.Choice> random, int rolls) Creates an instance of aQuestRewardsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidgive(net.minecraft.server.level.ServerPlayer player) final inthashCode()Returns a hash code value for this object.booleanisEmpty()List<net.minecraft.world.item.ItemStack>items()Returns the value of theitemsrecord component.random()Returns the value of therandomrecord component.static QuestRewardsread(com.google.gson.JsonObject json, net.minecraft.core.HolderLookup.Provider registries) introlls()Returns the value of therollsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QuestRewards
public QuestRewards(List<net.minecraft.world.item.ItemStack> items, List<QuestRewards.Choice> random, int rolls) Creates an instance of aQuestRewardsrecord class.- Parameters:
items- the value for theitemsrecord componentrandom- the value for therandomrecord componentrolls- the value for therollsrecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
read
public static QuestRewards read(com.google.gson.JsonObject json, net.minecraft.core.HolderLookup.Provider registries) -
give
public void give(net.minecraft.server.level.ServerPlayer player) -
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 '=='. -
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
random
Returns the value of therandomrecord component.- Returns:
- the value of the
randomrecord component
-
rolls
public int rolls()Returns the value of therollsrecord component.- Returns:
- the value of the
rollsrecord component
-