Record Class NetworkStateBuilder.NetworkStateImpl<L extends PacketListener>

java.lang.Object
java.lang.Record
net.minecraft.network.NetworkStateBuilder.NetworkStateImpl<L>
Record Components:
id -
side -
codec -
bundleHandler -
All Implemented Interfaces:
NetworkState<L>
Enclosing class:
NetworkStateBuilder<T extends PacketListener,B extends ByteBuf>

private static record NetworkStateBuilder.NetworkStateImpl<L extends PacketListener>(NetworkPhase id, NetworkSide side, PacketCodec<ByteBuf,Packet<? super L extends PacketListener>> codec, @Nullable PacketBundleHandler bundleHandler) extends Record implements NetworkState<L>
Mappings:
Namespace Name
named net/minecraft/network/NetworkStateBuilder$NetworkStateImpl
intermediary net/minecraft/class_9147$class_9149
official aab$b
named id
intermediary comp_2234
official a
named side
intermediary comp_2235
official b
named codec
intermediary comp_2236
official c
named bundleHandler
intermediary comp_2237
official d
  • Field Details

  • Constructor Details

  • Method Details

    • bundleHandler

      @Nullable public @Nullable PacketBundleHandler bundleHandler()
      Returns the value of the bundleHandler record component.
      Specified by:
      bundleHandler in interface NetworkState<L extends PacketListener>
      Returns:
      the value of the bundleHandler record component
    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public NetworkPhase id()
      Returns the value of the id record component.
      Specified by:
      id in interface NetworkState<L extends PacketListener>
      Returns:
      the value of the id record component
    • side

      public NetworkSide side()
      Returns the value of the side record component.
      Specified by:
      side in interface NetworkState<L extends PacketListener>
      Returns:
      the value of the side record component
    • codec

      public PacketCodec<ByteBuf,Packet<? super L>> codec()
      Returns the value of the codec record component.
      Specified by:
      codec in interface NetworkState<L extends PacketListener>
      Returns:
      the value of the codec record component