Record Class ServerRestaurantOrder.RewardEntry
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.order.ServerRestaurantOrder.RewardEntry
- All Implemented Interfaces:
IRestaurantOrder.Entry
- Enclosing class:
ServerRestaurantOrder
public static record ServerRestaurantOrder.RewardEntry(net.minecraft.core.Holder<IReward> reward, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu)
extends Record
implements IRestaurantOrder.Entry
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.restaurant.order.IRestaurantOrder.Entry
IRestaurantOrder.Entry.Visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<List<ServerRestaurantOrder.RewardEntry>> -
Constructor Summary
ConstructorsConstructorDescriptionRewardEntry(net.minecraft.core.Holder<IReward> reward, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aRewardEntryrecord 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.booleanReturns the value of thepersistsToMenurecord component.net.minecraft.core.Holder<IReward> reward()Returns the value of therewardrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.world.restaurant.order.IRestaurantOrder.Entry
everVisible
-
Field Details
-
LIST_CODEC
public static final com.mojang.serialization.Codec<List<ServerRestaurantOrder.RewardEntry>> LIST_CODEC
-
-
Constructor Details
-
RewardEntry
public RewardEntry(net.minecraft.core.Holder<IReward> reward, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aRewardEntryrecord class.- Parameters:
reward- the value for therewardrecord componentvisibility- the value for thevisibilityrecord componentpersistsToMenu- the value for thepersistsToMenurecord component
-
-
Method Details
-
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 '=='. -
reward
Returns the value of therewardrecord component.- Returns:
- the value of the
rewardrecord component
-
visibility
Returns the value of thevisibilityrecord component.- Specified by:
visibilityin interfaceIRestaurantOrder.Entry- Returns:
- the value of the
visibilityrecord component
-
persistsToMenu
public boolean persistsToMenu()Returns the value of thepersistsToMenurecord component.- Specified by:
persistsToMenuin interfaceIRestaurantOrder.Entry- Returns:
- the value of the
persistsToMenurecord component
-