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>
  • Field Details

    • id

      private final ConnectionProtocol id
      The field for the id record component.
    • flow

      private final PacketFlow flow
      The field for the flow record component.
    • codec

      private final StreamCodec<io.netty.buffer.ByteBuf,Packet<? super L extends PacketListener>> codec
      The field for the codec record component.
    • bundlerInfo

      @Nullable private final BundlerInfo bundlerInfo
      The field for the bundlerInfo 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 a Implementation record class.
      Parameters:
      id - the value for the id record component
      flow - the value for the flow record component
      codec - the value for the codec record component
      bundlerInfo - the value for the bundlerInfo record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public ConnectionProtocol id()
      Returns the value of the id record component.
      Specified by:
      id in interface ProtocolInfo<L extends PacketListener>
      Returns:
      the value of the id record component
    • flow

      public PacketFlow flow()
      Returns the value of the flow record component.
      Specified by:
      flow in interface ProtocolInfo<L extends PacketListener>
      Returns:
      the value of the flow record component
    • codec

      public StreamCodec<io.netty.buffer.ByteBuf,Packet<? super L>> codec()
      Returns the value of the codec record component.
      Specified by:
      codec in interface ProtocolInfo<L extends PacketListener>
      Returns:
      the value of the codec record component
    • bundlerInfo

      @Nullable public BundlerInfo bundlerInfo()
      Returns the value of the bundlerInfo record component.
      Specified by:
      bundlerInfo in interface ProtocolInfo<L extends PacketListener>
      Returns:
      the value of the bundlerInfo record component