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
Modifier and TypeFieldDescriptionprivate final BundlerInfo
The field for thebundlerInfo
record component.private final StreamCodec
<io.netty.buffer.ByteBuf, Packet<? super L>> The field for thecodec
record component.private final PacketFlow
The field for theflow
record component.private final ConnectionProtocol
The field for theid
record component. -
Constructor Summary
ConstructorDescriptionImplementation
(ConnectionProtocol id, PacketFlow flow, StreamCodec<io.netty.buffer.ByteBuf, Packet<? super L>> codec, BundlerInfo bundlerInfo) Creates an instance of aImplementation
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebundlerInfo
record component.StreamCodec
<io.netty.buffer.ByteBuf, Packet<? super L>> codec()
Returns the value of thecodec
record component.final boolean
Indicates whether some other object is "equal to" this one.flow()
Returns the value of theflow
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
The field for theid
record component. -
flow
The field for theflow
record component. -
codec
The field for thecodec
record component. -
bundlerInfo
The field for thebundlerInfo
record 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 aImplementation
record class.- Parameters:
id
- the value for theid
record componentflow
- the value for theflow
record componentcodec
- the value for thecodec
record componentbundlerInfo
- the value for thebundlerInfo
record component
-
-
Method Details
-
bundlerInfo
Returns the value of thebundlerInfo
record component.- Specified by:
bundlerInfo
in interfaceProtocolInfo<L extends PacketListener>
- Returns:
- the value of the
bundlerInfo
record component
-
id
Returns the value of theid
record component.- Specified by:
id
in interfaceProtocolInfo<L extends PacketListener>
- Returns:
- the value of the
id
record component
-
flow
Returns the value of theflow
record component.- Specified by:
flow
in interfaceProtocolInfo<L extends PacketListener>
- Returns:
- the value of the
flow
record component
-
codec
Returns the value of thecodec
record component.- Specified by:
codec
in interfaceProtocolInfo<L extends PacketListener>
- Returns:
- the value of the
codec
record component
-
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)
.
-