Record Class Recipe.CommonInfo
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.Recipe.CommonInfo
- Enclosing interface:
Recipe<T extends RecipeInput>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<Recipe.CommonInfo> private final booleanThe field for theshowNotificationrecord component.static final StreamCodec<RegistryFriendlyByteBuf, Recipe.CommonInfo> -
Constructor Summary
ConstructorsConstructorDescriptionCommonInfo(boolean showNotification) Creates an instance of aCommonInforecord 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.booleanReturns the value of theshowNotificationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
showNotification
private final boolean showNotificationThe field for theshowNotificationrecord component. -
MAP_CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
CommonInfo
public CommonInfo(boolean showNotification) Creates an instance of aCommonInforecord class.- Parameters:
showNotification- the value for theshowNotificationrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
showNotification
public boolean showNotification()Returns the value of theshowNotificationrecord component.- Returns:
- the value of the
showNotificationrecord component
-