Record Class ClientRestaurantOrder
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.order.ClientRestaurantOrder
- All Implemented Interfaces:
IRestaurantOrder
public record ClientRestaurantOrder(int id, IAdvancedIngredient<? super net.minecraft.world.item.ItemStack> ingredient, List<RestaurantOrderModifier.Info> modifiersInfo, List<IRewardInfo> rewardsInfo)
extends Record
implements IRestaurantOrder
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.restaurant.order.IRestaurantOrder
IRestaurantOrder.Entry -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, IRestaurantOrder> Fields inherited from interface petrolpark.mc.library.core.world.restaurant.order.IRestaurantOrder
SERVER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionClientRestaurantOrder(int id, IAdvancedIngredient<? super net.minecraft.world.item.ItemStack> ingredient, List<RestaurantOrderModifier.Info> modifiersInfo, List<IRewardInfo> rewardsInfo) Creates an instance of aClientRestaurantOrderrecord 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.intid()Returns the value of theidrecord component.IAdvancedIngredient<? super net.minecraft.world.item.ItemStack> Returns the value of theingredientrecord component.Returns the value of themodifiersInforecord component.Returns the value of therewardsInforecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,IRestaurantOrder> STREAM_CODEC
-
-
Constructor Details
-
ClientRestaurantOrder
public ClientRestaurantOrder(int id, IAdvancedIngredient<? super net.minecraft.world.item.ItemStack> ingredient, List<RestaurantOrderModifier.Info> modifiersInfo, List<IRewardInfo> rewardsInfo) Creates an instance of aClientRestaurantOrderrecord class.- Parameters:
id- the value for theidrecord componentingredient- the value for theingredientrecord componentmodifiersInfo- the value for themodifiersInforecord componentrewardsInfo- the value for therewardsInforecord 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 '=='. -
id
public int id()Returns the value of theidrecord component.- Specified by:
idin interfaceIRestaurantOrder- Returns:
- the value of the
idrecord component
-
ingredient
Returns the value of theingredientrecord component.- Specified by:
ingredientin interfaceIRestaurantOrder- Returns:
- the value of the
ingredientrecord component
-
modifiersInfo
Returns the value of themodifiersInforecord component.- Specified by:
modifiersInfoin interfaceIRestaurantOrder- Returns:
- the value of the
modifiersInforecord component
-
rewardsInfo
Returns the value of therewardsInforecord component.- Specified by:
rewardsInfoin interfaceIRestaurantOrder- Returns:
- the value of the
rewardsInforecord component
-