Record Class SoupData
java.lang.Object
java.lang.Record
com.mrbysco.chowderexpress.entity.SoupData
public record SoupData(net.minecraft.world.item.ItemStackTemplate stack, int nutrition, float saturationModifier)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.net.minecraft.resources.IdentifierintReturns the value of thenutritionrecord component.floatReturns the value of thesaturationModifierrecord component.net.minecraft.world.item.ItemStackTemplatestack()Returns the value of thestackrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SoupData> STREAM_CODEC
-
-
Constructor Details
-
SoupData
public SoupData(net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.world.food.FoodProperties foodProperties) -
SoupData
public SoupData(net.minecraft.world.item.ItemStackTemplate stack, int nutrition, float saturationModifier) Creates an instance of aSoupDatarecord class.- Parameters:
stack- the value for thestackrecord componentnutrition- the value for thenutritionrecord componentsaturationModifier- the value for thesaturationModifierrecord component
-
-
Method Details
-
identifier
public net.minecraft.resources.Identifier identifier() -
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 thecomparemethod from their corresponding wrapper classes. -
hashCode
-
toString
-
stack
public net.minecraft.world.item.ItemStackTemplate stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
nutrition
public int nutrition()Returns the value of thenutritionrecord component.- Returns:
- the value of the
nutritionrecord component
-
saturationModifier
public float saturationModifier()Returns the value of thesaturationModifierrecord component.- Returns:
- the value of the
saturationModifierrecord component
-