Record Class ClientboundRecipeBookAddPacket.Entry
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundRecipeBookAddPacket.Entry
- Enclosing class:
ClientboundRecipeBookAddPacket
public static record ClientboundRecipeBookAddPacket.Entry(RecipeDisplayEntry contents, byte flags)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RecipeDisplayEntryThe field for thecontentsrecord component.static final bytestatic final byteprivate final byteThe field for theflagsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(RecipeDisplayEntry contents, boolean notification, boolean highlight) Entry(RecipeDisplayEntry contents, byte flags) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.byteflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
contents
The field for thecontentsrecord component. -
flags
private final byte flagsThe field for theflagsrecord component. -
FLAG_NOTIFICATION
public static final byte FLAG_NOTIFICATION- See Also:
-
FLAG_HIGHLIGHT
public static final byte FLAG_HIGHLIGHT- See Also:
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundRecipeBookAddPacket.Entry> STREAM_CODEC
-
-
Constructor Details
-
Entry
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
contents- the value for thecontentsrecord componentflags- the value for theflagsrecord component
-
-
Method Details
-
notification
public boolean notification() -
highlight
public boolean highlight() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-
flags
public byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-