Record Class RestaurantOrderGenerator.RewardsEntry
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.order.RestaurantOrderGenerator.RewardsEntry
- All Implemented Interfaces:
IRestaurantOrder.Entry
- Enclosing class:
RestaurantOrderGenerator
public static record RestaurantOrderGenerator.RewardsEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, net.minecraft.core.Holder<IRewardGenerator> rewards, 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<RestaurantOrderGenerator.RewardsEntry> -
Constructor Summary
ConstructorsConstructorDescriptionRewardsEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, net.minecraft.core.Holder<IRewardGenerator> rewards, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aRewardsEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.storage.loot.providers.number.NumberProviderchance()Returns the value of thechancerecord component.final 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<IRewardGenerator> rewards()Returns the value of therewardsrecord 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
-
CODEC
-
-
Constructor Details
-
RewardsEntry
public RewardsEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, net.minecraft.core.Holder<IRewardGenerator> rewards, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aRewardsEntryrecord class.- Parameters:
chance- the value for thechancerecord componentrewards- the value for therewardsrecord 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 '=='. -
chance
public net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance()Returns the value of thechancerecord component.- Returns:
- the value of the
chancerecord component
-
rewards
Returns the value of therewardsrecord component.- Returns:
- the value of the
rewardsrecord 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
-