Record Class ClientboundOpenBookPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundOpenBookPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundOpenBookPacket(InteractionHand hand)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InteractionHandThe field for thehandrecord component.static final StreamCodec<FriendlyByteBuf, ClientboundOpenBookPacket> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aClientboundOpenBookPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.hand()Returns the value of thehandrecord component.voidhandle(ClientGamePacketListener listener) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
hand
The field for thehandrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundOpenBookPacket
Creates an instance of aClientboundOpenBookPacketrecord class.- Parameters:
hand- the value for thehandrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- 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. All components in this record class are compared withObjects::equals(Object,Object). -
hand
Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-