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 theentriesrecord component.private final booleanThe field for thereplacerecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundRecipeBookAddPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundRecipeBookAddPacket(List<ClientboundRecipeBookAddPacket.Entry> entries, boolean replace) Creates an instance of aClientboundRecipeBookAddPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.booleanreplace()Returns the value of thereplacerecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
entries
The field for theentriesrecord component. -
replace
private final boolean replaceThe field for thereplacerecord 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 aClientboundRecipeBookAddPacketrecord class.- Parameters:
entries- the value for theentriesrecord componentreplace- the value for thereplacerecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
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. -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
replace
public boolean replace()Returns the value of thereplacerecord component.- Returns:
- the value of the
replacerecord component
-