Record Class Restaurant.OrderGeneratorEntry
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.Restaurant.OrderGeneratorEntry
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser
- Enclosing class:
Restaurant
public static record Restaurant.OrderGeneratorEntry(net.minecraft.core.Holder<RestaurantOrderGenerator> generator, net.minecraft.world.level.storage.loot.providers.number.NumberProvider weight)
extends Record
implements net.minecraft.world.level.storage.loot.LootContextUser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Restaurant.OrderGeneratorEntry> -
Constructor Summary
ConstructorsConstructorDescriptionOrderGeneratorEntry(net.minecraft.core.Holder<RestaurantOrderGenerator> generator, net.minecraft.world.level.storage.loot.providers.number.NumberProvider weight) Creates an instance of aOrderGeneratorEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.Holder<RestaurantOrderGenerator> Returns the value of thegeneratorrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.voidvalidate(net.minecraft.world.level.storage.loot.ValidationContext context) net.minecraft.world.level.storage.loot.providers.number.NumberProviderweight()Returns the value of theweightrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams
-
Field Details
-
CODEC
-
-
Constructor Details
-
OrderGeneratorEntry
public OrderGeneratorEntry(net.minecraft.core.Holder<RestaurantOrderGenerator> generator, net.minecraft.world.level.storage.loot.providers.number.NumberProvider weight) Creates an instance of aOrderGeneratorEntryrecord class.- Parameters:
generator- the value for thegeneratorrecord componentweight- the value for theweightrecord component
-
-
Method Details
-
validate
public void validate(net.minecraft.world.level.storage.loot.ValidationContext context) - Specified by:
validatein interfacenet.minecraft.world.level.storage.loot.LootContextUser
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
generator
Returns the value of thegeneratorrecord component.- Returns:
- the value of the
generatorrecord component
-
weight
public net.minecraft.world.level.storage.loot.providers.number.NumberProvider weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-