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 RecipeDisplayEntry
The field for thecontents
record component.static final byte
static final byte
private final byte
The field for theflags
record component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry
(RecipeDisplayEntry p_379464_, boolean p_379564_, boolean p_380200_) Entry
(RecipeDisplayEntry contents, byte flags) Creates an instance of aEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()
Returns the value of thecontents
record component.final boolean
Indicates whether some other object is "equal to" this one.byte
flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
contents
The field for thecontents
record component. -
flags
private final byte flagsThe field for theflags
record 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 aEntry
record class.- Parameters:
contents
- the value for thecontents
record componentflags
- the value for theflags
record component
-
-
Method Details
-
notification
public boolean notification() -
highlight
public boolean highlight() -
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 '=='. -
contents
Returns the value of thecontents
record component.- Returns:
- the value of the
contents
record component
-
flags
public byte flags()Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-