Record Class RestaurantOrderGenerator.ModifierEntry
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.order.RestaurantOrderGenerator.ModifierEntry
- All Implemented Interfaces:
IRestaurantOrder.Entry
- Enclosing class:
RestaurantOrderGenerator
public static record RestaurantOrderGenerator.ModifierEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, IngredientRandomizer ingredient, net.minecraft.world.level.storage.loot.providers.number.NumberProvider successMultiplier, net.minecraft.world.level.storage.loot.providers.number.NumberProvider failureMultiplier, 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.ModifierEntry> -
Constructor Summary
ConstructorsConstructorDescriptionModifierEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, IngredientRandomizer ingredient, net.minecraft.world.level.storage.loot.providers.number.NumberProvider successMultiplier, net.minecraft.world.level.storage.loot.providers.number.NumberProvider failureMultiplier, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aModifierEntryrecord 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.net.minecraft.world.level.storage.loot.providers.number.NumberProviderReturns the value of thefailureMultiplierrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientrecord component.booleanReturns the value of thepersistsToMenurecord component.net.minecraft.world.level.storage.loot.providers.number.NumberProviderReturns the value of thesuccessMultiplierrecord 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
-
ModifierEntry
public ModifierEntry(net.minecraft.world.level.storage.loot.providers.number.NumberProvider chance, IngredientRandomizer ingredient, net.minecraft.world.level.storage.loot.providers.number.NumberProvider successMultiplier, net.minecraft.world.level.storage.loot.providers.number.NumberProvider failureMultiplier, IRestaurantOrder.Entry.Visibility visibility, boolean persistsToMenu) Creates an instance of aModifierEntryrecord class.- Parameters:
chance- the value for thechancerecord componentingredient- the value for theingredientrecord componentsuccessMultiplier- the value for thesuccessMultiplierrecord componentfailureMultiplier- the value for thefailureMultiplierrecord 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
-
ingredient
Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
successMultiplier
public net.minecraft.world.level.storage.loot.providers.number.NumberProvider successMultiplier()Returns the value of thesuccessMultiplierrecord component.- Returns:
- the value of the
successMultiplierrecord component
-
failureMultiplier
public net.minecraft.world.level.storage.loot.providers.number.NumberProvider failureMultiplier()Returns the value of thefailureMultiplierrecord component.- Returns:
- the value of the
failureMultiplierrecord 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
-