Record Class ClientboundRecipeBookAddPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundRecipeBookAddPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundRecipeBookAddPacket(List<ClientboundRecipeBookAddPacket.Entry> entries, boolean replace)
extends Record
implements Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<ClientboundRecipeBookAddPacket.Entry> The field for theentries
record component.private final boolean
The field for thereplace
record component.static final StreamCodec
<RegistryFriendlyByteBuf, ClientboundRecipeBookAddPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundRecipeBookAddPacket
(List<ClientboundRecipeBookAddPacket.Entry> entries, boolean replace) Creates an instance of aClientboundRecipeBookAddPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionentries()
Returns the value of theentries
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_379319_) final int
hashCode()
Returns a hash code value for this object.boolean
replace()
Returns the value of thereplace
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
entries
The field for theentries
record component. -
replace
private final boolean replaceThe field for thereplace
record component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundRecipeBookAddPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundRecipeBookAddPacket
public ClientboundRecipeBookAddPacket(List<ClientboundRecipeBookAddPacket.Entry> entries, boolean replace) Creates an instance of aClientboundRecipeBookAddPacket
record class.- Parameters:
entries
- the value for theentries
record componentreplace
- the value for thereplace
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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 '=='. -
entries
Returns the value of theentries
record component.- Returns:
- the value of the
entries
record component
-
replace
public boolean replace()Returns the value of thereplace
record component.- Returns:
- the value of the
replace
record component
-