Package net.minecraft.network.protocol
Record Class ProtocolInfoBuilder.Implementation<L extends PacketListener>
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.ProtocolInfoBuilder.Implementation<L>
- All Implemented Interfaces:
ProtocolInfo<L>
- Enclosing class:
ProtocolInfoBuilder<T extends PacketListener,B extends io.netty.buffer.ByteBuf>
static record ProtocolInfoBuilder.Implementation<L extends PacketListener>(ConnectionProtocol id, PacketFlow flow, StreamCodec<io.netty.buffer.ByteBuf,Packet<? super L extends PacketListener>> codec, @Nullable BundlerInfo bundlerInfo)
extends Record
implements ProtocolInfo<L>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.ProtocolInfo
ProtocolInfo.Unbound<T extends PacketListener,B extends io.netty.buffer.ByteBuf> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BundlerInfoThe field for thebundlerInforecord component.private final StreamCodec<io.netty.buffer.ByteBuf, Packet<? super L>> The field for thecodecrecord component.private final PacketFlowThe field for theflowrecord component.private final ConnectionProtocolThe field for theidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionImplementation(ConnectionProtocol id, PacketFlow flow, StreamCodec<io.netty.buffer.ByteBuf, Packet<? super L>> codec, BundlerInfo bundlerInfo) Creates an instance of aImplementationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebundlerInforecord component.StreamCodec<io.netty.buffer.ByteBuf, Packet<? super L>> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.flow()Returns the value of theflowrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
flow
The field for theflowrecord component. -
codec
The field for thecodecrecord component. -
bundlerInfo
The field for thebundlerInforecord component.
-
-
Constructor Details
-
Implementation
Implementation(ConnectionProtocol id, PacketFlow flow, StreamCodec<io.netty.buffer.ByteBuf, Packet<? super L>> codec, @Nullable BundlerInfo bundlerInfo) Creates an instance of aImplementationrecord class.- Parameters:
id- the value for theidrecord componentflow- the value for theflowrecord componentcodec- the value for thecodecrecord componentbundlerInfo- the value for thebundlerInforecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceProtocolInfo<L extends PacketListener>- Returns:
- the value of the
idrecord component
-
flow
Returns the value of theflowrecord component.- Specified by:
flowin interfaceProtocolInfo<L extends PacketListener>- Returns:
- the value of the
flowrecord component
-
codec
Returns the value of thecodecrecord component.- Specified by:
codecin interfaceProtocolInfo<L extends PacketListener>- Returns:
- the value of the
codecrecord component
-
bundlerInfo
Returns the value of thebundlerInforecord component.- Specified by:
bundlerInfoin interfaceProtocolInfo<L extends PacketListener>- Returns:
- the value of the
bundlerInforecord component
-